import type { SizeType, UnitSize } from '../types' // Ensure size and units are correctly formatted export function standardSize(value: number | string | undefined, unit: UnitSize = 'px') { if (value === undefined || value === '') { return '' } // Handle SizeType values if (typeof value === 'string') { const sizeTypeMap: Record = { xs: 16, sm: 24, md: 32, lg: 48, xl: 64 } if (value in sizeTypeMap) { return `${sizeTypeMap[value as SizeType]}${unit}` } // Handle existing string values with units return value.endsWith(unit) ? value : `${value}${unit}` } return `${value}${unit}` }