fix js
This commit is contained in:
parent
966a0ce4b0
commit
6af62ae37e
|
|
@ -44,11 +44,16 @@ const Tabs = define('Tabs', {
|
|||
render({ props, parts: { Root, Tab } }) {
|
||||
return (
|
||||
<Root>
|
||||
<script dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
const ClickTab = (label) => console.log('Tab clicked:', label)
|
||||
`}} />
|
||||
|
||||
{props.items?.map((item: any) => (
|
||||
<Tab
|
||||
key={item.id}
|
||||
active={item.active}
|
||||
onClick={() => console.log('Tab clicked:', item.label)}
|
||||
onClick={`ClickTab("${item.label}")`}
|
||||
>
|
||||
{item.label}
|
||||
</Tab>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user