import React, { ComponentProps } from "react" import ReactMarkdown from "react-markdown" import remarkGfm from "remark-gfm" import { classNames } from "../../utils" import { Link } from "../Link" import { Text } from "../Text" type Components = NonNullable< ComponentProps["components"] > export type MarkdownProps = { children: string className?: string components?: Components } const MB_CLASS_NAME = classNames("mb-1.5 last:mb-0 lg:mb-3") export const Markdown = ({ children, className, components, }: MarkdownProps) => { const sharedClassName = classNames("w-fit") const baseComponents: Components = { a: ({ children, href }) => ( {children} ), img: () => null, iframe: () => null, p: props => (

), span: props => ( ), li: props => (

  • ), ul: ({ className, ...props }) => (