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) 1.37 kB
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),i=require("react"),o=require("../../Tab-D2mI5G0L.cjs"),s=t=>{const[a,l]=i.useState("1"),r=(b,n)=>l(n);return e.jsxs(o.TabContext,{value:a,children:[e.jsxs(o.TabList,{...t,onChange:r,"aria-label":"lib tablist example",children:[e.jsx(o.Tab,{label:"Item one",value:"1"}),e.jsx(o.Tab,{label:"Item two",value:"2"}),e.jsx(o.Tab,{label:"Item three",value:"3"})]}),e.jsx(o.TabPanel,{value:"1",children:"Item one"}),e.jsx(o.TabPanel,{value:"2",children:"Item two"}),e.jsx(o.TabPanel,{value:"3",children:"Item three"})]})},c={title:"Components/TabList",component:s,argTypes:{allowScrollButtonsMobile:{control:"boolean"},centered:{control:"boolean"},indicatorColor:{control:"radio",options:["primary","secondary"]},orientation:{control:"radio",options:["horizontal","vertical"]},scrollButtons:{control:"radio",options:["auto",!0,!1]},textColor:{control:"radio",options:["inherit","primary","secondary"]},variant:{control:"radio",options:["fullWidth","scrollable","standard"]},visibleScrollbar:{control:"boolean"}}},u={args:{allowScrollButtonsMobile:!1,centered:!1,indicatorColor:"primary",orientation:"horizontal",scrollButtons:"auto",textColor:"primary",variant:"standard",visibleScrollbar:!1}};exports.Default=u;exports.default=c;