import React, { forwardRef } from 'react'; import { Flex, Box, type BoxProps } from '@chakra-ui/react'; import MyIcon from '../Icon'; type Props = Omit & { list: { icon?: string; label: string | React.ReactNode; value: T; }[]; value: T; onChange: (e: T) => void; }; const FillRowTabs = ({ list, value, onChange, py = '7px', px = '12px', ...props }: Props) => { return ( {list.map((item) => ( onChange(item.value) })} > {item.icon && } {item.label} ))} ); }; export default forwardRef(FillRowTabs) as ( props: Props & { ref?: React.Ref } ) => JSX.Element;