From 17fcfcb1b3bd088010f66adf4ed39102e1ba76c2 Mon Sep 17 00:00:00 2001 From: Le Minh Tri Date: Sat, 25 Feb 2023 21:53:04 +0700 Subject: [PATCH] feat(component): add component Breadcrumb --- src/components/Breadcrumb.astro | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/components/Breadcrumb.astro diff --git a/src/components/Breadcrumb.astro b/src/components/Breadcrumb.astro new file mode 100644 index 00000000..576feaa3 --- /dev/null +++ b/src/components/Breadcrumb.astro @@ -0,0 +1,61 @@ +--- +import Icon from '@/components/Icon.astro' + +interface BreadcrumbItem { + icon: string + title: string + url: string +} + +interface Props { + items: BreadcrumbItem[] +} + +const { items } = Astro.props +const hasIcon = (item: BreadcrumbItem) => item.icon.length > 0 +--- + +