import React from 'react' import type { BaseProps } from '@toptal/picasso-shared' import { twMerge } from '@toptal/picasso-tailwind-merge' import type { ASTType } from './types' import useRichText from './hooks/useRichText' export interface Props extends BaseProps { /** * [hast](https://github.com/syntax-tree/hast) format */ value: ASTType } export const RichText = ({ value, style, className, 'data-testid': dataTestId, }: Props) => { const richText = useRichText(value) return (
{richText}
) } export default RichText