You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: add `'use client'` to `Banner.CollapseButton` due to having event handlers
* fix: add `'use client'` to `Sidebar` due to having context
* fix: add `'use client'` to `SidebarItemGroup` due to having context
* fix: add support for individual import since compound components do not work in server components
* fix: tests + imports of deprecated `Tabs.Group` compound component; update docs
---------
Co-authored-by: Sebastian Sutu <sebastian.sutu@sensidev.com>
Copy file name to clipboardExpand all lines: app/docs/components/tabs/tabs.mdx
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ import { Tabs } from 'flowbite-react';
20
20
21
21
## Default tabs
22
22
23
-
Add the `<Tabs.Item>` child component to the `<Tabs.Group>` component to create a tab item and you can add any type of markup and React components inside of it and it will be shown when clicking on the associated tab item.
23
+
Add the `<Tabs.Item>` child component to the `<Tabs>` component to create a tab item and you can add any type of markup and React components inside of it and it will be shown when clicking on the associated tab item.
24
24
25
25
You can also choose to add the `active` prop to the `<Tabs.Item>` component to make it active by default and set the title of the tab item using the `title` prop.
26
26
@@ -33,7 +33,7 @@ import { MdDashboard } from 'react-icons/md';"
This is <spanclassName="font-medium text-gray-800 dark:text-white">Profile tab's associated content</span>.
177
177
Clicking another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to
@@ -195,15 +195,15 @@ import { MdDashboard } from 'react-icons/md';"
195
195
<Tabs.Itemdisabledtitle="Disabled">
196
196
Disabled content
197
197
</Tabs.Item>
198
-
</Tabs.Group>
198
+
</Tabs>
199
199
</CodePreview>
200
200
201
201
## React state options
202
202
203
203
Here's an example on how you can set the activate tab programatically using the React state variables and functions of `activateTab` and `setActivateTab`.
204
204
205
205
<CodePreview
206
-
code={`<Tabs.Group
206
+
code={`<Tabs
207
207
aria-label="Default tabs"
208
208
style="default"
209
209
ref={props.tabsRef}
@@ -232,7 +232,7 @@ Here's an example on how you can set the activate tab programatically using the
0 commit comments