import { WidthInterface } from '../../types'; import { stringOrNumberHelper } from './stringOrNumberHelper'; export const widthDecorator = ({ maxW, minW, width }: WidthInterface) => { let response = ''; if (maxW) { response += `max-width: ${stringOrNumberHelper(maxW)};`; } if (minW) { response += `min-width: ${stringOrNumberHelper(minW)};`; } if (width) { response += `width: ${stringOrNumberHelper(width)};`; } return response; };