File tree 4 files changed +2
-119
lines changed
packages/ui/src/components/Navbar
4 files changed +2
-119
lines changed Original file line number Diff line number Diff line change @@ -35,12 +35,6 @@ Use this example to feature a dropdown menu when clicking on the user avatar ins
35
35
36
36
<Example name = " navbar.withDropdown" />
37
37
38
- ## Navbar with Custom Bar/Menu Icon
39
-
40
- Use this example to use the custom Open Menu/Bar Icon
41
-
42
- <Example name = " navbar.withCustomMenuIcon" />
43
-
44
38
## Theme
45
39
46
40
To learn more about how to customize the appearance of components, please see the [ Theme docs] ( /docs/customize/theme ) .
Original file line number Diff line number Diff line change 1
1
export { root } from "./navbar.root" ;
2
2
export { withCTAButton } from "./navbar.withCTAButton" ;
3
- export { withCustomMenuIcon } from "./navbar.withCustomMenuIcon" ;
4
3
export { withDropdown } from "./navbar.withDropdown" ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
import type { ComponentProps , FC } from "react" ;
4
4
import { FaBars } from "react-icons/fa" ;
5
- import { IoMdClose } from "react-icons/io" ;
6
5
import { twMerge } from "tailwind-merge" ;
7
6
import { mergeDeep } from "../../helpers/merge-deep" ;
8
7
import type { DeepPartial } from "../../types" ;
@@ -15,13 +14,11 @@ export interface FlowbiteNavbarToggleTheme {
15
14
16
15
export interface NavbarToggleProps extends ComponentProps < "button" > {
17
16
barIcon ?: FC < ComponentProps < "svg" > > ;
18
- closeIcon ?: FC < ComponentProps < "svg" > > ;
19
17
theme ?: DeepPartial < FlowbiteNavbarToggleTheme > ;
20
18
}
21
19
22
20
export const NavbarToggle : FC < NavbarToggleProps > = ( {
23
21
barIcon : BarIcon = FaBars ,
24
- closeIcon : CloseIcon = IoMdClose ,
25
22
className,
26
23
theme : customTheme = { } ,
27
24
...props
@@ -41,8 +38,8 @@ export const NavbarToggle: FC<NavbarToggleProps> = ({
41
38
className = { twMerge ( theme . base , className ) }
42
39
{ ...props }
43
40
>
44
- < span className = "sr-only" > { isOpen ? "Close" : " Open" } main menu</ span >
45
- { isOpen ? < CloseIcon aria-hidden className = { theme . icon } /> : < BarIcon aria-hidden className = { theme . icon } /> }
41
+ < span className = "sr-only" > Open main menu</ span >
42
+ < BarIcon aria-hidden className = { theme . icon } />
46
43
</ button >
47
44
) ;
48
45
} ;
You can’t perform that action at this time.
0 commit comments