Skip to content

Commit

Permalink
revert: controlled tabs example
Browse files Browse the repository at this point in the history
  • Loading branch information
segunadebayo committed Nov 28, 2024
1 parent 912da82 commit d0bf0b2
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions packages/react/src/components/tabs/examples/controlled.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
import { Tabs } from '@ark-ui/react/tabs'
import { useState } from 'react'

let i = 0

export const Controlled = () => {
const [value, setValue] = useState<string | null>('react')

return (
<Tabs.Root
value={value}
onValueChange={(e) => {
if (i === 0) {
i++
} else {
setValue(e.value)
}
}}
>
<Tabs.Root value={value} onValueChange={(e) => setValue(e.value)}>
<Tabs.List>
<Tabs.Trigger value="react">React</Tabs.Trigger>
<Tabs.Trigger value="vue">Vue</Tabs.Trigger>
Expand Down

0 comments on commit d0bf0b2

Please sign in to comment.