@onesy/ui-react
Version:
UI for React
64 lines • 2.32 kB
JavaScript
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
const _excluded = ["ref", "className", "children"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
import { c as _c } from "react/compiler-runtime";
import React from 'react';
import { useOnesyTheme } from '@onesy/style-react';
const ModalIcon = props_ => {
const $ = _c(13);
const theme = useOnesyTheme();
const t0 = theme?.ui?.elements?.all?.props?.default;
const t1 = theme?.ui?.elements?.onesyModalIcon?.props?.default;
let children;
let other;
let ref;
if ($[0] !== props_ || $[1] !== t0 || $[2] !== t1) {
const props = _objectSpread(_objectSpread(_objectSpread({}, t0), t1), props_);
const {
ref: t2,
className,
children: t3
} = props,
t4 = _objectWithoutProperties(props, _excluded);
ref = t2;
children = t3;
other = t4;
$[0] = props_;
$[1] = t0;
$[2] = t1;
$[3] = children;
$[4] = other;
$[5] = ref;
} else {
children = $[3];
other = $[4];
ref = $[5];
}
let t2;
if ($[6] !== children || $[7] !== other || $[8] !== ref) {
let t3;
if ($[10] !== other || $[11] !== ref) {
t3 = _objectSpread({
ref,
size: "regular"
}, other);
$[10] = other;
$[11] = ref;
$[12] = t3;
} else {
t3 = $[12];
}
t2 = /*#__PURE__*/React.cloneElement(children, t3);
$[6] = children;
$[7] = other;
$[8] = ref;
$[9] = t2;
} else {
t2 = $[9];
}
return t2;
};
ModalIcon.displayName = 'onesy-ModalIcon';
export default ModalIcon;