UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

24 lines (23 loc) 649 B
"use client"; //#region packages/@mantine/core/src/core/Box/get-box-style/get-box-style.ts function mergeStyles(styles, theme) { if (Array.isArray(styles)) return [...styles].reduce((acc, item) => ({ ...acc, ...mergeStyles(item, theme) }), {}); if (typeof styles === "function") return styles(theme); if (styles == null) return {}; return styles; } function getBoxStyle({ theme, style, vars, styleProps }) { const _style = mergeStyles(style, theme); const _vars = mergeStyles(vars, theme); return { ..._style, ..._vars, ...styleProps }; } //#endregion exports.getBoxStyle = getBoxStyle; //# sourceMappingURL=get-box-style.cjs.map