UNPKG

@cgi-learning-hub/ui

Version:

@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features

38 lines (37 loc) 710 B
import { I as c, J as l } from "./identifier-PWESmBq6.js"; const a = (t) => { var s; const e = { systemProps: {}, otherProps: {} }, o = ((s = t == null ? void 0 : t.theme) == null ? void 0 : s.unstable_sxConfig) ?? l; return Object.keys(t).forEach((n) => { o[n] ? e.systemProps[n] = t[n] : e.otherProps[n] = t[n]; }), e; }; function x(t) { const { sx: e, ...o } = t, { systemProps: s, otherProps: n } = a(o); let r; return Array.isArray(e) ? r = [s, ...e] : typeof e == "function" ? r = (...f) => { const i = e(...f); return c(i) ? { ...s, ...i } : s; } : r = { ...s, ...e }, { ...n, sx: r }; } export { x as e };