import React from 'react'; import { Flex, Box, BoxProps } from '@chakra-ui/react'; import MyIcon from '../Icon'; type Props = Omit & { list: { icon?: string; label: string | React.ReactNode; value: string; }[]; value: string; onChange: (e: string) => 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 FillRowTabs;