ant-design/components/tooltip/demo/disabled-children.tsx
叶枫 502dac12aa
docs: format code (#48309)
* docs: fix code

* feat: lint

* feat: prettier

* feat: test

* feat: review

* feat: format html

* feat: format html
2024-04-08 14:04:08 +08:00

29 lines
732 B
TypeScript

import React from 'react';
import { Button, Checkbox, Input, InputNumber, Select, Space, Tooltip } from 'antd';
const WrapperTooltip: React.FC<{ children?: React.ReactNode }> = (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;