import React, { ComponentType } from 'react'; import { ButtonProps, WithFillColorProps, WithActionProps, } from '../../../types'; export default < Props extends WithFillColorProps & WithActionProps & ButtonProps >( WrappedComponent: ComponentType> ): ComponentType> => // memo( (props: Omit) => { const { active, ...rest } = props; const fill = active ? '#34e79a' : '#fff'; return ( )} fill={fill} /> ); }; // (next: Omit, prev: Omit) => next.active === prev.active // );