ant-design/components/tooltip/demo/disabled-children.tsx
lijianan 8b1f79c1f5
demo: update demo type { children: React.ReactNode } => React.PropsWithChildren ()
* demo: update demo type React.ReactNode => React.PropsWithChildren

* fix: fix
2024-05-06 12:04:27 +08:00

29 lines
725 B
TypeScript

import React from 'react';
import { Button, Checkbox, Input, InputNumber, Select, Space, Tooltip } from 'antd';
const WrapperTooltip: React.FC<React.PropsWithChildren> = (props) => (
<Tooltip title="Thanks for using antd. Have a nice day!" {...props} />
);
const App: React.FC = () => (
<Space>
<WrapperTooltip>
<Button disabled>Disabled</Button>
</WrapperTooltip>
<WrapperTooltip>
<Input disabled placeholder="disabled" />
</WrapperTooltip>
<WrapperTooltip>
<InputNumber disabled />
</WrapperTooltip>
<WrapperTooltip>
<Checkbox disabled />
</WrapperTooltip>
<WrapperTooltip>
<Select disabled />
</WrapperTooltip>
</Space>
);
export default App;