import m from 'mithril' ; import classnames from 'classnames' ; import { Classes , IAttrs } from '../../_shared' ; export interface IBreadcrumbItemAttrs extends IAttrs { [ htmlAttrs ] : any ; } export class BreadcrumbItem implements m . Component < IBreadcrumbItemAttrs > { public view ( { attrs , children } ) { const { class : className , ... htmlAttrs } = attrs ; const tag = htmlAttrs . href != null ? 'a' : 'span' ; const classes = classnames ( Classes . BREADCRUMB_ITEM , className ) ; return m ( tag , { ... htmlAttrs , class : classes } , children ) ; } }