chore: markdown for text

This commit is contained in:
wonderlandpark 2021-03-07 22:13:39 +09:00
parent 05e215f7b3
commit 7a482b3dd5

View File

@ -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>
) )
} }