mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +08:00
5b8e4e51e9
* chore: bump types def * chore: part ts def * chore: part ts def * chore: part ts def * chore: part ts def * chore: part ts def * chore: part ts def * chore: part ts def * chore: part ts def * chore: part ts def * chore: part ts def * chore: free --legacy-peer-deps * chore: ignore peer * chore: fix ts logic * chore: use fork docsearch * chore: fix demo ts
18 lines
578 B
TypeScript
18 lines
578 B
TypeScript
import * as React from 'react';
|
|
import { ConfigContext } from '../config-provider';
|
|
|
|
interface BreadcrumbSeparatorInterface extends React.FC<{ children?: React.ReactNode }> {
|
|
__ANT_BREADCRUMB_SEPARATOR: boolean;
|
|
}
|
|
|
|
const BreadcrumbSeparator: BreadcrumbSeparatorInterface = ({ children }) => {
|
|
const { getPrefixCls } = React.useContext(ConfigContext);
|
|
const prefixCls = getPrefixCls('breadcrumb');
|
|
|
|
return <span className={`${prefixCls}-separator`}>{children || '/'}</span>;
|
|
};
|
|
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
|
|
export default BreadcrumbSeparator;
|