1import { H3 } from '~/components/plugins/Headings'; 2import { STYLES_APIBOX } from '~/components/plugins/api/APISectionUtils'; 3import { PlatformName } from '~/types/common'; 4import { PlatformTags } from '~/ui/components/Tag'; 5 6type APIBoxProps = React.PropsWithChildren<{ 7 header?: string; 8 platforms?: PlatformName[]; 9 className?: string; 10}>; 11 12export const APIBox = ({ header, platforms, children, className }: APIBoxProps) => { 13 return ( 14 <div css={STYLES_APIBOX} className={className}> 15 {platforms && <PlatformTags prefix="Only for:" platforms={platforms} />} 16 {header && <H3 tags={platforms}>{header}</H3>} 17 {children} 18 </div> 19 ); 20}; 21