File size: 630 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import * as React from 'react';
import { ConfigContext } from '../config-provider';
type CompoundedComponent = React.FC<React.PropsWithChildren> & {
/** @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;
|