Skip to content

Commit eba5968

Browse files
committed
named export hook
1 parent 572ab9e commit eba5968

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/components/Nav/Mobile/LvlAccordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const LvlAccordion = ({
5757
<AccordionItem
5858
key={label}
5959
value={label}
60-
className={cn("border-t border-body-light last:border-b")}
60+
className="border-t border-body-light last:border-b"
6161
>
6262
<AccordionPrimitive.Trigger asChild>
6363
{/* TODO: replace this with ButtonLink when is implemented */}

src/components/Nav/Mobile/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import MenuBody from "./MenuBody"
1414
import MenuFooter from "./MenuFooter"
1515
import MenuHeader from "./MenuHeader"
1616

17-
import useDisclosure from "@/hooks/useDisclosure"
17+
import { useDisclosure } from "@/hooks/useDisclosure"
1818

1919
type MobileNavMenuProps = ButtonProps & {
2020
toggleColorMode: () => void

src/hooks/useDisclosure.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useBoolean } from "usehooks-ts"
44
* Hook that provides a more semantic API for managing the open/close state of a
55
* modal, dropdown, or any other component that can be opened and closed.
66
*/
7-
function useDisclosure(defaultValue = false) {
7+
export const useDisclosure = (defaultValue = false) => {
88
const { value, setTrue, setFalse, toggle } = useBoolean(defaultValue)
99

1010
return {
@@ -14,5 +14,3 @@ function useDisclosure(defaultValue = false) {
1414
onToggle: toggle,
1515
}
1616
}
17-
18-
export default useDisclosure

0 commit comments

Comments
 (0)