Implement Breadcrumbs component

This commit is contained in:
filantrop 2022-07-28 13:34:45 +03:00
parent 39a7f64252
commit 5fe9f484d3

View File

@ -0,0 +1,21 @@
import { isArray } from "lodash";
import React from "react";
type Props = {
divider?: string;
children: React.ReactNode;
}
/* -------------------------------------------------------------------------- */
/* use: <Breadcrumbs divider="/","●" or any> children </Breadcrumbs> */
/* -------------------------------------------------------------------------- */
export default function Breadcrumbs({divider ,children}: Props) {
return(
<>
{divider}&nbsp;{
isArray(children) ? children.join(' '+divider+' ') : children
}
&nbsp;{divider}
</>
)
}