feat(web): alert dialog and text ui github flavoured markdown support

apparently doka wants to see the tables he makes to feed his never ending addiction of tables
This commit is contained in:
Luke
2023-01-29 13:29:06 +01:00
parent 26a1ecb93d
commit 0c6661714f
4 changed files with 197 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import ReactMarkdown from 'react-markdown';
import { useNuiEvent } from '../../hooks/useNuiEvent';
import { fetchNui } from '../../utils/fetchNui';
import { useLocales } from '../../providers/LocaleProvider';
import remarkGfm from 'remark-gfm';
export interface AlertProps {
header: string;
@@ -56,7 +57,7 @@ const AlertDialog: React.FC = () => {
title={<ReactMarkdown>{dialogData.header}</ReactMarkdown>}
>
<Stack>
<ReactMarkdown>{dialogData.content}</ReactMarkdown>
<ReactMarkdown remarkPlugins={[remarkGfm]}>{dialogData.content}</ReactMarkdown>
<Group position="right" spacing={10}>
{dialogData.cancel && (
<Button uppercase variant="default" onClick={() => closeAlert('cancel')} mr={3}>