@aqua-ds/web-components
Version:
AquaDS Web Components
20 lines (18 loc) • 683 B
JavaScript
function Sizes(component) {
const mixinSizeGetValue = (value) => {
return typeof value === 'string' || typeof value === 'undefined' ? value : `${value}px`;
};
return {
get mixinSizeStyle() {
return {
maxHeight: mixinSizeGetValue(component.maxHeight),
minHeight: mixinSizeGetValue(component.minHeight),
maxWidth: mixinSizeGetValue(component.maxWidth),
minWidth: mixinSizeGetValue(component.minWidth),
height: mixinSizeGetValue(component.height),
width: mixinSizeGetValue(component.width),
};
},
};
}
export { Sizes as S };