UNPKG

v8-ui-atoms

Version:

A library of common base components for building ui

49 lines 1.19 kB
// TODO: find and remove refs and delete this export const classPrefix = '.mwg-'; export const borderRadius = (factor = '4px') => { return ` border-radius: ${factor}; `; }; export const appendEllipsis = ` overflow-x: hidden; text-overflow: ellipsis; white-space: nowrap; `; export const shadows = { large: '0px 5px 10px 0px rgba(0, 0, 0, 0.1)', medium: '0px 2px 4px 0px rgba(0, 0, 0, 0.15)', small: '0px 2px 4px 0px rgba(0, 0, 0, 0.05)' }; export const mapAlignmentToFlex = alignmentProp => { switch (alignmentProp.toLowerCase()) { case 'left': return 'flex-start'; case 'center': return 'center'; case 'right': return 'flex-end'; default: return 'flex-start'; } }; export const visuallyHidden = ` clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; `; export const keyFrames = (name, rules) => { return ` @-webkit-keyframes ${name} { ${rules} } @keyframes ${name} { ${rules} } `; }; //# sourceMappingURL=utils.js.map