|
|
|
@ -4,24 +4,21 @@ import { components } from "../../../redux/actions"; |
|
|
|
|
|
|
|
|
|
function Sidebar({ list, setActive }) { |
|
|
|
|
return ( |
|
|
|
|
<div |
|
|
|
|
className="lg:flex lg:flex-col lg:w-1/6 lg:h-full" |
|
|
|
|
style={{ direction: "ltr" }} |
|
|
|
|
> |
|
|
|
|
<header className="w-full flex flex-row items-center h-16 px-1 py-4 bg-gray-700"> |
|
|
|
|
<div className="lg:flex lg:flex-col lg:w-1/6 lg:h-full ltr"> |
|
|
|
|
<header className="w-full h-16 flex flex-row items-center py-4 px-4 bg-gray-600"> |
|
|
|
|
<img |
|
|
|
|
src={"https://barnamenegar.ir/static/media/white logo 2.7ffbddbc.svg"} |
|
|
|
|
alt="logo" |
|
|
|
|
className="w-full" |
|
|
|
|
/> |
|
|
|
|
</header> |
|
|
|
|
<ul className="w-full flex-1 p-0 m-0 list-none divided divide-y max-h-full overflow-y-scroll divide-blue-100 border-r border-gray-200"> |
|
|
|
|
<ul className="w-full max-h-full flex-1 p-0 m-0 list-none divided divide-y overflow-y-scroll divide-blue-600 border-r border-gray-600"> |
|
|
|
|
{list |
|
|
|
|
.sort((a, b) => (a.name > b.name ? 1 : -1)) |
|
|
|
|
.map((material, index) => ( |
|
|
|
|
<li |
|
|
|
|
key={index} |
|
|
|
|
className="w-full py-3 px-3 font-medium text-md cursor-pointer h-12" |
|
|
|
|
className="w-full h-12 py-3 px-3 cursor-pointer" |
|
|
|
|
onClick={() => setActive(material)} |
|
|
|
|
> |
|
|
|
|
{material.name} |
|
|
|
|