import { Component } from 'react'; export interface IBreadcrumbItemProps { className?: string; name?: React.ReactNode; href?: string; onClick?: () => void; } export class BreadcrumbItem extends Component { render() { const { href, name, ...others } = this.props; if (this.props.children) { return this.props.children; } return href ? ( {name} ) : ( {name} ); } } export default BreadcrumbItem;