UNPKG

@lanaco/lnc-react-ui

Version:

React component library

105 lines (95 loc) 1.99 kB
import { jsx as u } from "react/jsx-runtime"; import { s as a } from "./emotion-styled.browser.esm-DfbrHHed.js"; import { c as o, b } from "./utils-BUdHa0nB.js"; import { u as i } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js"; const l = a.div` display: inline-flex; flex-wrap: wrap; width: fit-content; border-radius: ${(t) => t.borderRadius}; & button { border: none; border-top: ${(t) => "0.0625rem solid " + o( t.theme, "ButtonGroup", t.color, "enabled", "border" )}; border-bottom: ${(t) => "0.0625rem solid " + o( t.theme, "ButtonGroup", t.color, "enabled", "border" )}; } & button:focus { outline: none; } & button:not(:first-of-type):not(:last-of-type) { border-radius: 0; } & button[data-type="filled"], button[data-type="tinted"] { border: none; } & button:first-of-type { border-radius: ${(t) => `${t.borderRadius} 0 0 ${t.borderRadius}`}; border-left: ${(t) => "0.0625rem solid " + o( t.theme, "ButtonGroup", t.color, "enabled", "border" )}; } & button:last-of-type { border-radius: ${(t) => `0 ${t.borderRadius} ${t.borderRadius} 0`}; border-right: ${(t) => "0.0625rem solid " + o( t.theme, "ButtonGroup", t.color, "enabled", "border" )}; } & button:first-of-type:not([data-type="filled"]) { border-right: ${(t) => "0.0625rem solid " + o( t.theme, "ButtonGroup", t.color, "enabled", "border" )}; } & button:not(:first-of-type):not(:last-of-type):not([data-type="filled"]) { border-right: ${(t) => "0.0625rem solid " + o( t.theme, "ButtonGroup", t.color, "enabled", "border" )}; } `, h = ({ children: t, borderRadius: r = "regular", style: d = {}, className: n = "" }) => { const e = i(); return /* @__PURE__ */ u( l, { borderRadius: b(e, r), theme: e, style: d, className: "lnc-ui-button-group " + n, children: t } ); }; export { h as default };