import mapValues from 'lodash/mapValues' ; import { Properties } from 'csstype' ; import type { StyleRule } from '@vanilla-extract/css' ; export const mapToStyleProperty = < Key extends string | number , Value extends string | number > ( map , propertyName , mapper ? ) => mapValues ( map , ( value ) => mapper ? mapper ( value , propertyName ) : { [ propertyName ] : value } ) ;