import { SquareSizeInterface } from 'types'; import { stringOrNumberHelper } from './stringOrNumberHelper'; export const squareSizeDecorator = ({ size, maxS, minS, }: SquareSizeInterface) => { let response = ''; if (size) { response += `height: ${stringOrNumberHelper(size)}; width: ${stringOrNumberHelper(size)};`; } if (maxS) { response += `max-height: ${stringOrNumberHelper(maxS)}; max-width: ${stringOrNumberHelper(maxS)};`; } if (minS) { response += `min-height: ${stringOrNumberHelper(minS)}; min-width: ${stringOrNumberHelper(minS)};`; } return response; };