mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-30 20:38:45 +08:00
ac5a06027e
This reverts commit ea8ed28209
.
23 lines
637 B
TypeScript
23 lines
637 B
TypeScript
import * as React from 'react';
|
|
import { ConfigContext } from '../config-provider';
|
|
|
|
type CompoundedComponent = React.FC<{ children?: React.ReactNode }> & {
|
|
/** @internal */
|
|
__ANT_BREADCRUMB_SEPARATOR: boolean;
|
|
};
|
|
|
|
const BreadcrumbSeparator: CompoundedComponent = ({ children }) => {
|
|
const { getPrefixCls } = React.useContext(ConfigContext);
|
|
const prefixCls = getPrefixCls('breadcrumb');
|
|
|
|
return (
|
|
<li className={`${prefixCls}-separator`} aria-hidden="true">
|
|
{children === '' ? children : children || '/'}
|
|
</li>
|
|
);
|
|
};
|
|
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
|
|
export default BreadcrumbSeparator;
|