mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
chore: markdown for text
This commit is contained in:
parent
05e215f7b3
commit
7a482b3dd5
@ -1,11 +1,12 @@
|
|||||||
import { MessageColor } from '@utils/Constants'
|
import { MessageColor } from '@utils/Constants'
|
||||||
|
import Markdown from './Markdown'
|
||||||
|
|
||||||
const Message = ({ type, children }: MessageProps): JSX.Element => {
|
const Message = ({ type, children }: MessageProps): JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`${MessageColor[type]} px-6 py-4 rounded-md text-base mx-auto w-full text-left`}
|
className={`${MessageColor[type]} px-6 py-4 rounded-md text-base mx-auto w-full text-left`}
|
||||||
>
|
>
|
||||||
{children}
|
{ typeof children === 'string' ? <Markdown text={children} /> : children }
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user