This commit is contained in:
Chris Wanstrath 2025-12-26 21:46:47 -08:00
parent 966a0ce4b0
commit 6af62ae37e

View File

@ -44,11 +44,16 @@ const Tabs = define('Tabs', {
render({ props, parts: { Root, Tab } }) { render({ props, parts: { Root, Tab } }) {
return ( return (
<Root> <Root>
<script dangerouslySetInnerHTML={{
__html: `
const ClickTab = (label) => console.log('Tab clicked:', label)
`}} />
{props.items?.map((item: any) => ( {props.items?.map((item: any) => (
<Tab <Tab
key={item.id} key={item.id}
active={item.active} active={item.active}
onClick={() => console.log('Tab clicked:', item.label)} onClick={`ClickTab("${item.label}")`}
> >
{item.label} {item.label}
</Tab> </Tab>