mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-21 13:18:04 +08:00
91f9fc2ff9
* fix: token update * refactor: font map token * chore: code clean * chore: code clean * chore: code clean * chore: update snapshot * chore: menu style
36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import React from 'react';
|
|
import { SettingOutlined } from '@ant-design/icons';
|
|
import { Cascader, Input, Select, Space } from 'antd';
|
|
|
|
const { Option } = Select;
|
|
|
|
const selectBefore = (
|
|
<Select defaultValue="http://">
|
|
<Option value="http://">http://</Option>
|
|
<Option value="https://">https://</Option>
|
|
</Select>
|
|
);
|
|
const selectAfter = (
|
|
<Select defaultValue=".com">
|
|
<Option value=".com">.com</Option>
|
|
<Option value=".jp">.jp</Option>
|
|
<Option value=".cn">.cn</Option>
|
|
<Option value=".org">.org</Option>
|
|
</Select>
|
|
);
|
|
|
|
const App: React.FC = () => (
|
|
<Space direction="vertical">
|
|
<Input addonBefore="http://" addonAfter=".com" defaultValue="mysite" />
|
|
<Input addonBefore={selectBefore} addonAfter={selectAfter} defaultValue="mysite" />
|
|
<Input addonAfter={<SettingOutlined />} defaultValue="mysite" />
|
|
<Input addonBefore="http://" suffix=".com" defaultValue="mysite" />
|
|
<Input
|
|
addonBefore={<Cascader placeholder="cascader" style={{ width: 150 }} />}
|
|
defaultValue="mysite"
|
|
/>
|
|
</Space>
|
|
);
|
|
|
|
export default App;
|