summaryrefslogtreecommitdiff
path: root/src/lib/brand/components/Breadcrumb.jsx
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-10-13 09:16:04 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-10-13 09:16:04 +0700
commit26cee59f3abad5a9c45821ebdccc8ccb819c930b (patch)
tree6d90eef71db8d1ab9b456b43aef36b5873d13998 /src/lib/brand/components/Breadcrumb.jsx
parent6115a7b9e9e1cd2231c946609cb1ceac6d167386 (diff)
parent80295b97150495f56bd236a5345c2ddeb8313267 (diff)
Merge branch 'CR/breadcrumb' into CR/UI
Diffstat (limited to 'src/lib/brand/components/Breadcrumb.jsx')
-rw-r--r--src/lib/brand/components/Breadcrumb.jsx40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/lib/brand/components/Breadcrumb.jsx b/src/lib/brand/components/Breadcrumb.jsx
new file mode 100644
index 00000000..0fec2dad
--- /dev/null
+++ b/src/lib/brand/components/Breadcrumb.jsx
@@ -0,0 +1,40 @@
+import { Breadcrumb as ChakraBreadcrumb, BreadcrumbItem, BreadcrumbLink } from '@chakra-ui/react'
+import Link from 'next/link'
+import React from 'react'
+
+/**
+ * Renders a breadcrumb component with links to navigate through different pages.
+ *
+ * @param {Object} props - The props object containing the brand name.
+ * @param {string} props.brandName - The name of the brand to display in the breadcrumb.
+ * @return {JSX.Element} The rendered breadcrumb component.
+ */
+const Breadcrumb = ({ brandName }) => {
+ return (
+ <div className='container mx-auto py-4 md:py-6'>
+ <ChakraBreadcrumb>
+ <BreadcrumbItem>
+ <BreadcrumbLink as={Link} href='/' className='!text-danger-500 whitespace-nowrap'>
+ Home
+ </BreadcrumbLink>
+ </BreadcrumbItem>
+
+ <BreadcrumbItem>
+ <BreadcrumbLink
+ as={Link}
+ href='/shop/brands'
+ className='!text-danger-500 whitespace-nowrap'
+ >
+ Brands
+ </BreadcrumbLink>
+ </BreadcrumbItem>
+
+ <BreadcrumbItem isCurrentPage>
+ <BreadcrumbLink className='whitespace-nowrap'>{brandName}</BreadcrumbLink>
+ </BreadcrumbItem>
+ </ChakraBreadcrumb>
+ </div>
+ )
+}
+
+export default Breadcrumb