UNPKG

@gannochenko/ui.styled-components

Version:

<!-- PROJECT SHIELDS --> <!-- *** Reference links are enclosed in brackets [ ] instead of parentheses ( ). *** See the bottom of this document for the declaration of the reference variables *** for contributors-url, forks-url, etc. This is an optional, co

21 lines 694 B
import { op } from './op'; export const rectangle = (height = null, width = null, k) => { let realHeight = height; let realWidth = width; if (realHeight === null) { realHeight = realWidth; } else if (realWidth === null) { realWidth = realHeight; } const realCoefficient = k !== null && k !== void 0 ? k : 1; if (realCoefficient !== 1) { realWidth = op(width, (v) => v * realCoefficient); realHeight = op(height, (v) => v * realCoefficient); } return ` ${realWidth !== null ? `width: ${realWidth};` : ''} ${realHeight !== null ? `height: ${realHeight};` : ''} `; }; //# sourceMappingURL=rectangle.js.map