import React , { FC , SVGProps } from 'react' ; import { makeStyles } from '@mui/styles' ; import clsx from 'clsx' ; const useStyles = makeStyles ( ( theme ) => ( { icon : { fill : theme ?. palette ?. primary ?. main , } , } ) ) ; export const withPrimaryColor = ( Component ) => { const ComponentPrimaryColored = ( props ) => { const classes = useStyles ( ) ; const { className , ... restProps } = props ; return ( < Component className = { clsx ( classes . icon , className ) } { ... restProps } />); } ; return ComponentPrimaryColored ; } ;