UNPKG

@devvie/bottom-sheet

Version:

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

22 lines • 579 B
/** * 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; }; export default separatePaddingStyles; //# sourceMappingURL=separatePaddingStyles.js.map