You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
765 B

'use strict';
import React from 'react';
let prefixCls = 'ant-breadcrumb';
let BreadcrumbItem = React.createClass({
render() {
var link = <a className={prefixCls + '-link'} {...this.props}>{this.props.children}</a>;
var slash = <span className={prefixCls + '-slash'}>/</span>;
if (typeof this.props.href === 'undefined') {
slash = '';
link = <span className={prefixCls + '-link'} {...this.props}>{this.props.children}</span>;
}
return (
<span>
{link}
{slash}
</span>
);
}
});
let Breadcrumb = React.createClass({
render() {
return (
<div className={prefixCls}>
{this.props.children}
</div>
);
}
});
Breadcrumb.Item = BreadcrumbItem;
export default Breadcrumb;