sate-lib
Version:
A lightweight and modular React component library designed for modern web interfaces. **SATE Lib** powers the [sate.menu](https://sate.menu) platform with reusable, scalable, and themeable UI components.
1 lines • 736 B
JavaScript
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{useId as l}from"react";import t from"./tabs.styles.module.js";function i({className:i="",size:r="medium",options:m,defaultValue:d,onChange:s,ariaLabel:o="Filters"}){let n=l(),u=`tabs-${n}`;return a("fieldset",{className:[t.root,"medium"===r?"bodyDefault":"bodySmall",i].filter(Boolean).join(" "),"data-size":r,children:[e("legend",{className:t.legend,children:o}),m.map(l=>{let i=`${u}-${l.value}`;return a("div",{className:t.itemWrap,children:[e("input",{className:t.input,defaultChecked:l.value===d,disabled:l.disabled,id:i,name:u,onChange:()=>s?.(l.value),type:"radio",value:l.value}),e("label",{className:t.item,htmlFor:i,children:l.label})]},l.value)})]})}export{i as Tabs};