Skip to content

Commit

Permalink
fix: #130 input with btn icon
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxy0551 committed Dec 17, 2024
1 parent 5dc60b1 commit 3ff557c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 7 additions & 0 deletions components/input/demo/unit-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ unit input example.

```jsx
import { Input } from 'antd';
import { SettingOutlined } from '@ant-design/icons';

ReactDOM.render(
<div>
Expand All @@ -24,6 +25,12 @@ ReactDOM.render(
<div style={{ marginTop: '16px'}}>
<Input addonBefore="¥" placeholder="小数保留后两位"/>
</div>
<div style={{ marginTop: '16px'}}>
<Input addonAfter={<SettingOutlined />} defaultValue="mysite" />
</div>
<div style={{ marginTop: '16px'}}>
<Input addonBefore="http://" suffix=".com" defaultValue="mysite" />
</div>
</div>,
mountNode
);
Expand Down
12 changes: 7 additions & 5 deletions theme/dt-theme/default/input.less
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,13 @@
}
}

.ant-btn-icon-only {
width: 32px;
background: none;
.anticon-search {
margin-left: 9px;
.ant-input-group-addon {
.ant-btn-icon-only {
width: 32px;
background: none;
.anticon-search {
margin-left: 9px;
}
}
}

Expand Down

0 comments on commit 3ff557c

Please sign in to comment.