mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
28 lines
767 B
TypeScript
28 lines
767 B
TypeScript
import { useState } from 'react'
|
|
|
|
import MarkdownSVG from '#assets/markdown.svg'
|
|
|
|
export const MarkdownHint = () => {
|
|
const [expended, setExpended] = useState<boolean>(false)
|
|
return (
|
|
<div
|
|
onClick={() => {
|
|
setExpended(true)
|
|
}}
|
|
title='Markdown is supported'
|
|
className='flex tw:flex-row tw:text-gray-400 tw:cursor-pointer tw:items-center'
|
|
>
|
|
<img src={MarkdownSVG} alt='Markdown' className='octicon octicon-markdown tw:gray-400' />
|
|
{expended && (
|
|
<a
|
|
href='https://www.markdownguide.org/cheat-sheet/#basic-syntax'
|
|
target='_blank'
|
|
rel='noreferrer'
|
|
>
|
|
<span className='Button-label tw:ml-1'>Markdown is support</span>{' '}
|
|
</a>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|