parent
3bcf0d6bf3
commit
b3f82d5fa9
8 changed files with 106 additions and 71 deletions
After Width: | Height: | Size: 470 B |
After Width: | Height: | Size: 470 B |
@ -0,0 +1,61 @@ |
||||
import React from "react"; |
||||
|
||||
import grayLeftArrow from "./gray-arrow-left.svg"; |
||||
import blackLeftArrow from "./black-arrow-left.svg"; |
||||
|
||||
const BreadCrumb = ({ breadCrumbs }) => { |
||||
return ( |
||||
<div> |
||||
<div className="flex flex-row items-center"> |
||||
{breadCrumbs.map((breadCrumb, index) => ( |
||||
<div className="flex flex-row items-center" key={index}> |
||||
<span |
||||
className={`cursor-pointer text-xs hover:text-blue-900 ${ |
||||
breadCrumb.active ? "text-blue-900" : "text-blue-400" |
||||
}`}
|
||||
> |
||||
{breadCrumb.name} |
||||
</span> |
||||
{Number(index) !== breadCrumbs.length - 1 && ( |
||||
<div |
||||
className={`mx-2 ${ |
||||
breadCrumb.active ? "text-blue-900" : "text-blue-400" |
||||
}`}
|
||||
> |
||||
{/* {breadCrumb.active === true ? ( |
||||
<img src={grayLeftArrow} className="w-10" /> |
||||
) : ( |
||||
<img src={blackLeftArrow} className="w-10" /> |
||||
)} */} |
||||
<img src={grayLeftArrow} className="w-4" /> |
||||
</div> |
||||
)} |
||||
</div> |
||||
))} |
||||
</div> |
||||
</div> |
||||
); |
||||
}; |
||||
|
||||
export default BreadCrumb; |
||||
|
||||
BreadCrumb.defaultProps = { |
||||
breadCrumbs: [ |
||||
{ |
||||
name: "صفحه اصلی", |
||||
active: false, |
||||
}, |
||||
{ |
||||
name: "آمار و گزارشات", |
||||
active: false, |
||||
}, |
||||
{ |
||||
name: "فروش محصولات", |
||||
active: false, |
||||
}, |
||||
{ |
||||
name: "سال 1400", |
||||
active: true, |
||||
}, |
||||
], |
||||
}; |
@ -0,0 +1,7 @@ |
||||
import React from "react"; |
||||
|
||||
const index = () => { |
||||
return <div>index</div>; |
||||
}; |
||||
|
||||
export default index; |
@ -0,0 +1,25 @@ |
||||
import React from "react"; |
||||
|
||||
const TitleSubtitle = ({ title, subTitle }) => { |
||||
return ( |
||||
<div> |
||||
{/* page Title */} |
||||
<div className="flex flex-row items-center"> |
||||
<div className="w-1 h-5 bg-blue-500 rounded ml-1"></div> |
||||
<h2 className="text-base text-blue-900">{title}</h2> |
||||
</div> |
||||
{/* page subTitle */} |
||||
<div className="flex flex-row items-center mt-4"> |
||||
<div className="w-1 h-5 bg-gray-400 rounded ml-1"></div> |
||||
<h2 className="text-xs">{subTitle}</h2> |
||||
</div> |
||||
</div> |
||||
); |
||||
}; |
||||
|
||||
export default TitleSubtitle; |
||||
|
||||
TitleSubtitle.defaultProps = { |
||||
title: "میزان فروش محصولات", |
||||
subTitle: "اطلاعات جداول مشخصاتی کارکنان مجموعه ایران تایر", |
||||
}; |
Loading…
Reference in new issue