import { PropsWithChildren } from 'react' import { CH } from '@code-hike/mdx/components' import { ArrowUpRight, Triangle } from 'lucide-react' import { Badge, cn, Collapsible_Shadcn_, CollapsibleContent_Shadcn_, CollapsibleTrigger_Shadcn_, Heading, Image, } from 'ui' import { Admonition } from 'ui-patterns/admonition' import { type ImageProps } from 'ui/src/components/Image/Image' import Avatar from '~/components/Avatar' import Chart from '~/components/Charts/PGCharts' import CodeBlock from '~/components/CodeBlock/CodeBlock' import ImageFadeStack from '~/components/ImageFadeStack' import ImageGrid from '~/components/ImageGrid' import InlineCodeTag from '~/components/InlineCode' import Quote from '~/components/Quote' // import all components used in blog articles here // to do: move this into a helper/utils, it is used elsewhere const ignoreClass = 'ignore-on-export' const LinkComponent = (props: PropsWithChildren) => ( {props.children}{' '} {props.target === '_blank' && } ) const BlogCollapsible = ({ title, ...props }: { title: string }) => { return ( {title} ) } export default function mdxComponents(type?: 'blog' | 'lp' | undefined) { const components = { CodeBlock, CH, h1: (props: any) => , h2: (props: any) => , h3: (props: any) => , h4: (props: any) => , h5: (props: any) => , h6: (props: any) => , Badge, Quote, Avatar, PGChart: (props: any) => { return }, pre: (props: any) => { if (props.className !== ignoreClass) { return } else { return } }, ImageGrid, ImageFadeStack, img: (props: any) => { if (props.className !== ignoreClass) { return ( ) } return }, Img: ({ zoomable = true, className, ...props }: ImageProps & { wide?: boolean }) => ( ), Link: LinkComponent, code: (props: any) => {props.children}, BlogCollapsible: (props: any) => , Admonition, } return components as any }