ant-design/.dumi/theme/builtins/Antd.tsx
𝑾𝒖𝒙𝒉 4dbb0075bb
docs(shared): Improve shared API docs (#51857)
* docs: split shardProps

* chore: update english

* chore: update style

* chore: update snap
2024-12-02 23:03:44 +08:00

16 lines
340 B
TypeScript

import * as React from 'react';
import * as all from 'antd';
interface AntdProps {
component: keyof typeof all;
}
function Antd(props: AntdProps) {
const { component, ...restProps } = props;
const Component = (all[component] ?? React.Fragment) as React.ComponentType;
return <Component {...restProps} />;
}
export default Antd;