Skip to content
Snippets Groups Projects
Commit 33e0f258 authored by Manoa Harinjo's avatar Manoa Harinjo
Browse files

afficher ou non l'icon dans menu

parent 2eba5dc4
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,7 @@ interface IMenu {
name?: string
userMenu?: boolean
options?: any
isIcon?: boolean
}
export function Menu(props: IMenu): JSX.Element
......
......@@ -14,10 +14,11 @@ interface Imenu {
name: string
userMenu?: boolean
options: any
isIcon?: boolean
}
const Menu = (props: Imenu) => {
const { className, name, userMenu = false } = props
const { className, name, userMenu = false, isIcon = true } = props
const location = useLocation()
......@@ -178,6 +179,7 @@ const Menu = (props: Imenu) => {
)}
</Link>
{itemChild?.children?.length > 0 &&
isIcon &&
subitems(itemChild)}
</li>
)
......@@ -221,7 +223,7 @@ const Menu = (props: Imenu) => {
>
{item.name}
</span>
{item.children?.length > 0 && (
{item.children?.length > 0 && isIcon && (
<ChevronDownIcon className="h-5 w-5" />
)}
</Link>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment