mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 01:29:11 +08:00
ae62ef7087
* fix(types): external module type error (CompoundedComponent) * feat(types): export CountdownProps
19 lines
571 B
TypeScript
19 lines
571 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 <span className={`${prefixCls}-separator`}>{children || '/'}</span>;
|
|
};
|
|
|
|
BreadcrumbSeparator.__ANT_BREADCRUMB_SEPARATOR = true;
|
|
|
|
export default BreadcrumbSeparator;
|