@lanaco/lnc-react-ui
Version:
React component library
60 lines (59 loc) • 1.39 kB
JavaScript
import { jsx as n } from "react/jsx-runtime";
import { n as x } from "./emotion-styled.browser.esm-CjCaF13H.js";
import { P as r } from "./index-S5Cd7WrG.js";
import { j as u, a as f } from "./utils-DtRLzzTZ.js";
import { u as p } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
const g = x.div`
padding: ${(e) => e.padding};
box-shadow: ${(e) => u(e.theme, e.boxShadow)};
border-radius: ${(e) => f(e.theme, e.borderRadius)};
width: ${(e) => e.fullWidth ? "100%" : "fit-content"};
border-top: 1px solid rgba(0, 0, 0, 0.04);
`, h = ({
children: e,
style: o = {},
className: s = "",
boxShadow: a = "s",
borderRadius: d = "regular",
padding: t = "s",
fullWidth: l = !1
}) => {
const i = p(), m = {
xs: "0.25rem",
s: "0.5rem",
m: "0.75rem",
l: "1rem",
xl: "1.25rem",
xxl: "1.5rem"
};
return /* @__PURE__ */ n(
g,
{
theme: i,
style: o,
className: "lnc-ui-surface " + s,
borderRadius: d,
boxShadow: a,
padding: m[t],
fullWidth: l,
children: e
}
);
};
h.propTypes = {
borderRadius: r.oneOf([
"slight",
"regular",
"edged",
"curved",
"none"
]),
boxShadow: r.oneOf(["xs", "s", "m", "l", "xl", "xxl"]),
paddign: r.oneOf(["xs", "s", "m", "l", "xl", "xxl"]),
fullWidth: r.bool,
className: r.string,
style: r.object
};
export {
h as default
};