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