UNPKG

@devvie/bottom-sheet

Version:

The 😎smart , 📦tiny , and 🎗flexible bottom sheet your app craves 🚀

28 lines (27 loc) • 703 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; /** * Extracts and separates `padding` styles from * other styles from the given `style` */ const separatePaddingStyles = style => { if (!style) return; const styleKeys = Object.keys(style || {}); if (!styleKeys.length) return; const styles = { paddingStyles: {}, otherStyles: {} }; for (const key of styleKeys) { // @ts-ignore styles[key.startsWith('padding') ? 'paddingStyles' : 'otherStyles'][key] = // @ts-ignore style[key]; } return styles; }; var _default = exports.default = separatePaddingStyles; //# sourceMappingURL=separatePaddingStyles.js.map