UNPKG

@onesy/ui-react

Version:
72 lines 2.86 kB
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; import _defineProperty from "@babel/runtime/helpers/defineProperty"; const _excluded = ["tonal", "color", "version", "elevation", "Component", "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 { classNames, style as styleMethod, useOnesyTheme } from '@onesy/style-react'; import LineElement from '../Line'; import { staticClassName } from '../utils'; import { jsx as _jsx } from "react/jsx-runtime"; const useStyle = styleMethod(theme => ({ root: { padding: theme.methods.space.value(3, 'px') } }), { name: 'onesy-CardFooter' }); const CardFooter = props_ => { const $ = _c(6); const theme = useOnesyTheme(); const props = _objectSpread(_objectSpread(_objectSpread({}, theme?.ui?.elements?.all?.props?.default), theme?.ui?.elements?.onesyCardFooter?.props?.default), props_); const Line = theme?.elements?.Line || LineElement; const { tonal: t0, color, version, elevation, Component: t1, className, children } = props, other = _objectWithoutProperties(props, _excluded); t0 === undefined ? true : t0; const Component = t1 === undefined ? "div" : t1; const { classes } = useStyle(); const t2 = 1; const t3 = "row"; const t4 = "wrap"; const t5 = "center"; const t6 = "flex-end"; const t7 = true; const t8 = classNames([staticClassName("CardFooter", theme) && ["onesy-CardFooter-root"], className, classes.root]); let t9; if ($[0] !== Component || $[1] !== Line || $[2] !== children || $[3] !== other || $[4] !== t8) { t9 = /*#__PURE__*/_jsx(Line, _objectSpread(_objectSpread({ gap: t2, direction: t3, wrap: t4, align: t5, justify: t6, fullWidth: t7, Component: Component, className: t8 }, other), {}, { children: children })); $[0] = Component; $[1] = Line; $[2] = children; $[3] = other; $[4] = t8; $[5] = t9; } else { t9 = $[5]; } return t9; }; CardFooter.displayName = 'onesy-CardFooter'; export default CardFooter;