Skip to content

Commit

Permalink
Add sub tabs.
Browse files Browse the repository at this point in the history
  • Loading branch information
novykh committed Dec 23, 2024
1 parent 237f8c8 commit 594e1c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/organisms/navigation/tabs/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState, useRef } from "react"
import Flex from "@/components/templates/flex"

const Tabs = ({ children, ...rest }) => {
const Tabs = ({ children, subTabs, ...rest }) => {
const [collapsed, setCollapsed] = useState(false)
const ref = useRef()

Expand All @@ -28,6 +28,10 @@ const Tabs = ({ children, ...rest }) => {
})
})}
</Flex>
{subTabs &&
React.cloneElement(subTabs, {
collapsed,
})}
<Flex
height="1px"
background="border"
Expand Down

0 comments on commit 594e1c0

Please sign in to comment.