UNPKG

@cgi-learning-hub/ui

Version:

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

2 lines (1 loc) 516 B
"use strict";const l=require("react/jsx-runtime"),s=require("./style.cjs.js"),c=({viewMode:n,buttonList:i,onChange:o,colorVariant:r="primary",size:a="small",orientation:u="horizontal"})=>l.jsx(s.StyledToggleButtonGroup,{value:n,exclusive:!0,onChange:(e,t)=>{t!==null&&o(t)},size:a,orientation:u,colorvariant:r,children:i.map(e=>l.jsxs(s.StyledToggleButton,{value:e.value,colorvariant:r,disabled:e.disabled,children:[e.icon,e.text&&l.jsx("span",{style:{marginLeft:8},children:e.text})]},e.value))});module.exports=c;