import { define } from '../src' import { ExampleSection } from './ssr/helpers' const TabSwitcher = define('TabSwitcher', { parts: { Input: { base: 'input', display: 'none', // Hide radio inputs }, TabBar: { display: 'flex', gap: 0, borderBottom: '2px solid #e5e7eb', marginBottom: 24, }, TabLabel: { base: 'label', padding: '12px 24px', position: 'relative', marginBottom: -2, background: 'transparent', borderBottom: '2px solid transparent', color: '#6b7280', fontSize: 14, fontWeight: 500, cursor: 'pointer', transition: 'all 0.2s ease', states: { ':hover': { color: '#111827', } } }, Content: { display: 'none', padding: 20, background: '#f9fafb', borderRadius: 8, } }, render({ props, parts: { Root, Input, TabBar, TabLabel, Content } }) { return ( {/* Hidden radio inputs */} {props.tabs?.map((tab: any, index: number) => ( ))} {/* Tab labels */} {props.tabs?.map((tab: any) => ( {tab.label} ))} {/* Tab content panels */} {props.tabs?.map((tab: any) => ( {tab.content} ))} {/* CSS to show active tab and content */}