From 5fe9f484d3641718defdae90157d2b65afa29107 Mon Sep 17 00:00:00 2001 From: filantrop Date: Thu, 28 Jul 2022 13:34:45 +0300 Subject: [PATCH] Implement Breadcrumbs component --- src/components/breadcrumbs.tsx | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/components/breadcrumbs.tsx diff --git a/src/components/breadcrumbs.tsx b/src/components/breadcrumbs.tsx new file mode 100644 index 0000000..90c9a4e --- /dev/null +++ b/src/components/breadcrumbs.tsx @@ -0,0 +1,21 @@ +import { isArray } from "lodash"; +import React from "react"; + +type Props = { + divider?: string; + children: React.ReactNode; +} +/* -------------------------------------------------------------------------- */ +/* use: children */ +/* -------------------------------------------------------------------------- */ +export default function Breadcrumbs({divider ,children}: Props) { + return( + <> + {divider} { + + isArray(children) ? children.join(' '+divider+' ') : children + } +  {divider} + + ) +} \ No newline at end of file