diff --git a/components/button/demo/icon.md b/components/button/demo/icon.md index fc84a760..3642e8b9 100644 --- a/components/button/demo/icon.md +++ b/components/button/demo/icon.md @@ -11,7 +11,7 @@ title: 图标按钮可添加 `dt-btn-highlight` 类名使用自定义 Icon 按钮和添加图标。 ```jsx import { Button } from 'antd'; -import { ReloadOutlined } from '@ant-design/icons'; +import { PlusSquareOutlined, ReloadOutlined } from '@ant-design/icons'; ReactDOM.render(
@@ -21,12 +21,11 @@ ReactDOM.render( 一级按钮 - - + +
+ + + + + +
+ + + +
, mountNode, ); diff --git a/theme/dt-theme/default/button.less b/theme/dt-theme/default/button.less index dfbd7347..dba1942f 100644 --- a/theme/dt-theme/default/button.less +++ b/theme/dt-theme/default/button.less @@ -1,11 +1,38 @@ @import "../const.less"; +.ant-btn > .anticon { + line-height: 0; +} + .ant-btn { line-height: 100%; box-shadow: unset; + display: inline-flex; + align-items: center; .anticon-minus, .anticon-plus { font-size: 13px; } + svg { + color: inherit; + font-size: 16px; + } +} + +.ant-btn.ant-btn-lg { + font-size: 16px; + svg { + font-size: 18px; + } +} + +.ant-btn.ant-btn-sm { + border-radius: 2px; + .anticon-search { + margin-left: 0; + } + svg { + font-size: 12px; + } } .ant-btn.ant-btn-primary { @@ -215,13 +242,6 @@ } } -.ant-btn.ant-btn-sm { - border-radius: 2px; - .anticon-search { - margin-left: 0; - } -} - .ant-btn-icon-only { padding: 0; width: 48px;