ant-design/components/breadcrumb/BreadcrumbSeparator.tsx
Dave ae62ef7087
[v4] Fix(types): external module type error (CompoundedComponent) (#39058)
* fix(types): external module type error (CompoundedComponent)

* feat(types): export CountdownProps
2023-01-03 11:46:48 +08:00

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;