import React, {CSSProperties} from 'react'; import cls from 'classnames'; import cn from './breadcrumb.module.styl'; export interface BreadcrumbProps { layers: string[]; className?: string; style?: CSSProperties; } export const Breadcrumb = (props: BreadcrumbProps) => { const {layers, className, style} = props; return ( {layers.map((val, idx) => { if (idx < layers.length - 1) { return ( {val} / ); } return {val}; })} ); };