started layout adjusting
This commit was merged in pull request #2.
This commit is contained in:
@@ -2,11 +2,12 @@ import { useState } from "react";
|
||||
import { useLocation } from "react-router-dom"
|
||||
import { FaCaretDown } from "react-icons/fa";
|
||||
import Icons from "../../Icons";
|
||||
import { generalLayoutContext } from "../../../context/GeneralLayoutContext";
|
||||
|
||||
|
||||
export default function AsideLinkWithSubLinks({shrinkAside, name, icon, to, children, isOpen}) {
|
||||
export default function AsideLinkWithSubLinks({name, icon, to, children, isOpen}) {
|
||||
|
||||
// const btnName = name
|
||||
const {shrinkAside} = generalLayoutContext()
|
||||
|
||||
const {pathname} = useLocation()
|
||||
|
||||
@@ -17,9 +18,9 @@ export default function AsideLinkWithSubLinks({shrinkAside, name, icon, to, chil
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`w-full px-4 text-[13px] font-semibold rounded`}
|
||||
className={`w-full px-4 py-2 my-1 text-[13px] sm:text-sm font-semibold rounded`}
|
||||
>
|
||||
<button onClick={()=>setHideSubMenu(prev => !prev)} name={name} className="py-2 w-full flex items-center justify-between gap-2 cursor-pointer text-slate-400">
|
||||
<button onClick={()=>setHideSubMenu(prev => !prev)} name={name} className="py-2 w-full flex items-center justify-between gap-2 cursor-pointer text-black-body/90 dark:text-white-body/90">
|
||||
<span className="flex gap-2 items-center">{icon && <Icons name={icon} />}{shrinkAside ? '' : name}</span>
|
||||
<FaCaretDown className={`text-base ${(hideSubMenu) ? 'rotate-180' : 'rotate-0'}`} />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user