1import { mergeClasses } from '@expo/styleguide'; 2import { forwardRef, PropsWithChildren } from 'react'; 3 4export type SnippetContentProps = PropsWithChildren<{ 5 alwaysDark?: boolean; 6 hideOverflow?: boolean; 7 className?: string; 8}>; 9 10export const SnippetContent = forwardRef<HTMLDivElement, SnippetContentProps>( 11 ({ children, className, alwaysDark = false, hideOverflow = false }: SnippetContentProps, ref) => ( 12 <div 13 ref={ref} 14 className={mergeClasses( 15 'text-default bg-subtle border border-default rounded-b-md overflow-x-auto p-4 !leading-[19px]', 16 'prose-code:!px-0', 17 alwaysDark && 'dark-theme bg-palette-black border-transparent whitespace-nowrap', 18 hideOverflow && 'overflow-hidden prose-code:!whitespace-nowrap', 19 className 20 )}> 21 {children} 22 </div> 23 ) 24); 25