Skip to content

Commit

Permalink
fix: poweroff icon in button (ant-design#20338)
Browse files Browse the repository at this point in the history
  • Loading branch information
vagusX authored and zombieJ committed Dec 19, 2019
1 parent 3de3fa4 commit e0aeb4f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
21 changes: 20 additions & 1 deletion components/button/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,26 @@ exports[`renders ./components/button/demo/loading.md correctly 1`] = `
class="ant-btn ant-btn-primary"
type="button"
>
poweroff
<span
aria-label="poweroff"
class="anticon anticon-poweroff"
role="img"
>
<svg
aria-hidden="true"
class=""
data-icon="poweroff"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"
/>
</svg>
</span>
<span>
Click me!
</span>
Expand Down
3 changes: 2 additions & 1 deletion components/button/demo/loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A loading indicator can be added to a button by setting the `loading` property o

```jsx
import { Button } from 'antd';
import { PoweroffOutlined } from '@ant-design/icons';

class App extends React.Component {
state = {
Expand Down Expand Up @@ -45,7 +46,7 @@ class App extends React.Component {
</Button>
<Button
type="primary"
icon="poweroff"
icon={<PoweroffOutlined />}
loading={this.state.iconLoading}
onClick={this.enterIconLoading}
>
Expand Down

0 comments on commit e0aeb4f

Please sign in to comment.