tweak(web): adjust markdown heading margins (#393)

* tweak(web): components for markdown headings

Fixed nomenclature and set as default export.

* fix(ui): temp remove MarkdownComponents file

* fix(ui): return MarkdownComponents file
This commit is contained in:
Jellyton
2023-08-07 03:05:15 -07:00
committed by GitHub
parent fcb0a566d3
commit c8cca20c89
6 changed files with 27 additions and 6 deletions

View File

@@ -6,6 +6,7 @@ import { fetchNui } from '../../utils/fetchNui';
import { useLocales } from '../../providers/LocaleProvider';
import remarkGfm from 'remark-gfm';
import type { AlertProps } from '../../typings';
import MarkdownComponents from '../../config/MarkdownComponents';
const AlertDialog: React.FC = () => {
const { locale } = useLocales();
@@ -46,12 +47,13 @@ const AlertDialog: React.FC = () => {
overlayOpacity={0.5}
exitTransitionDuration={150}
transition="fade"
title={<ReactMarkdown>{dialogData.header}</ReactMarkdown>}
title={<ReactMarkdown components={MarkdownComponents}>{dialogData.header}</ReactMarkdown>}
>
<Stack>
<ReactMarkdown
remarkPlugins={[remarkGfm]}
components={{
...MarkdownComponents,
img: ({ ...props }) => <img style={{ maxWidth: '100%', maxHeight: '100%' }} {...props} />,
}}
>