UNPKG

@cgi-learning-hub/ui

Version:

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

39 lines (38 loc) 816 B
import { jsx as a, jsxs as d } from "react/jsx-runtime"; import { StyledToggleButtonGroup as m, StyledToggleButton as p } from "./style.es.js"; const v = ({ viewMode: i, buttonList: o, onChange: t, colorVariant: l = "primary", size: n = "small", orientation: s = "horizontal" }) => /* @__PURE__ */ a( m, { value: i, exclusive: !0, onChange: (e, r) => { r !== null && t(r); }, size: n, orientation: s, colorvariant: l, children: o.map((e) => /* @__PURE__ */ d( p, { value: e.value, colorvariant: l, disabled: e.disabled, children: [ e.icon, e.text && /* @__PURE__ */ a("span", { style: { marginLeft: 8 }, children: e.text }) ] }, e.value )) } ); export { v as default };