From 5835baa94c4f003de5215e1da4329af597f75faf Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Fri, 22 Nov 2024 16:56:48 +0100 Subject: [PATCH 1/2] markdown hint --- .../Profile/Subcomponents/MarkdownHint.tsx | 34 +++++++++++++++++++ .../Profile/Subcomponents/ProfileTextForm.tsx | 17 ++++++---- 2 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 src/Components/Profile/Subcomponents/MarkdownHint.tsx diff --git a/src/Components/Profile/Subcomponents/MarkdownHint.tsx b/src/Components/Profile/Subcomponents/MarkdownHint.tsx new file mode 100644 index 00000000..7045527c --- /dev/null +++ b/src/Components/Profile/Subcomponents/MarkdownHint.tsx @@ -0,0 +1,34 @@ +import { useState } from 'react' + +export const MarkdownHint = () => { + const [expended, setExpended] = useState(false) + return ( +
setExpended(true)} + title='Markdown is supported' + className='flex tw-flex-row tw-text-gray-400 tw-cursor-pointer' + > + + {expended && ( + + Markdown is support{' '} + + )} +
+ ) +} diff --git a/src/Components/Profile/Subcomponents/ProfileTextForm.tsx b/src/Components/Profile/Subcomponents/ProfileTextForm.tsx index ccac9c44..364008f6 100644 --- a/src/Components/Profile/Subcomponents/ProfileTextForm.tsx +++ b/src/Components/Profile/Subcomponents/ProfileTextForm.tsx @@ -8,6 +8,8 @@ import { TextAreaInput } from '#components/Input' import { FormState } from '#src/types' import { getValue } from '#utils/GetValue' +import { MarkdownHint } from './MarkdownHint' + export const ProfileTextForm = ({ state, setState, @@ -33,12 +35,15 @@ export const ProfileTextForm = ({ return (
- +
+ + +
Date: Fri, 22 Nov 2024 18:22:27 +0100 Subject: [PATCH 2/2] make icon and text inline --- src/Components/Profile/Subcomponents/MarkdownHint.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Components/Profile/Subcomponents/MarkdownHint.tsx b/src/Components/Profile/Subcomponents/MarkdownHint.tsx index 7045527c..1b79bbc3 100644 --- a/src/Components/Profile/Subcomponents/MarkdownHint.tsx +++ b/src/Components/Profile/Subcomponents/MarkdownHint.tsx @@ -6,7 +6,7 @@ export const MarkdownHint = () => {
setExpended(true)} title='Markdown is supported' - className='flex tw-flex-row tw-text-gray-400 tw-cursor-pointer' + className='flex tw-flex-row tw-text-gray-400 tw-cursor-pointer tw-items-center' >