export const iconFromSvg = <T>(
icon: React.ComponentType<T>,
defaults: { fill?: string; cursor?: string } = {}
) =>
styledIcon(icon)([
(props: Props) => [
when(
!props.large && !props.extraLarge,
props.isPatientApp
? squareSizeVH(VHSize.standard)
: squareSize(PXSize.standard)
),
when(
props.large,
props.isPatientApp
? squareSizeVH(VHSize.large)
: squareSize(PXSize.large)
),
when(
props.extraLarge,
props.isPatientApp
? squareSizeVH(VHSize.extraLarge)
: squareSize(PXSize.extraLarge)
),