import React from 'react'; import { SilkeIcon, SilkeIcons } from '../silke-icon'; import { SilkeBox } from '../silke-box'; import styles from './silke-breadcrumb.scss'; import { SilkeText } from '../silke-text'; import { IEmojiIcon } from '@vev/utils'; import { SilkeImage } from '../silke-image'; type SilkeBreadcrumbProps = { icon?: IEmojiIcon | SilkeIcons; label?: React.ReactNode; noSlash?: boolean; onClick?: React.MouseEventHandler; }; export function SilkeBreadcrumb({ icon, label, noSlash, onClick }: SilkeBreadcrumbProps) { let cl = styles.breadbrumb; if (onClick) cl += ' ' + styles.interactive; const text = {label}; return ( {onClick ? ( ) => { event.preventDefault(); onClick(event); }} href="#" > {icon && ( )} {text} ) : ( <> {icon && } {text} )} {!noSlash && ( )} ); }