Skip to content

Commit

Permalink
feat(module: button): feat add dashed type (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
Guoyuanqiang authored and fisherspy committed Jan 31, 2019
1 parent 55ae6d2 commit 8759db0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
18 changes: 10 additions & 8 deletions components/button/demo/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@ import { Component } from '@angular/core';
selector: 'demo-button-basic',
template: `
<WingBlank>
<div Button (onClick)="onClick()">default</div>
<div Button [type]="'dashed'" (onClick)="onClick()">dashed</div>
<WhiteSpace ></WhiteSpace>
<div Button [disabled]="true">default diasbled</div>
<div Button (onClick)="onClick()">default</div>
<WhiteSpace ></WhiteSpace>
<div Button [type]="'primary'">primary</div>
<div Button [disabled]="true">default diasbled</div>
<WhiteSpace ></WhiteSpace>
<div Button [type]="'primary'" [disabled]="true">primary diasbled</div>
<div Button [type]="'primary'">primary</div>
<WhiteSpace ></WhiteSpace>
<div Button [type]="'warning'">warning</div>
<div Button [type]="'primary'" [disabled]="true">primary diasbled</div>
<WhiteSpace ></WhiteSpace>
<div Button [type]="'warning'" [disabled]="true">warning</div>
<div Button [type]="'warning'">warning</div>
<WhiteSpace ></WhiteSpace>
<div Button [loading]="true" >loading</div>
<div Button [type]="'warning'" [disabled]="true">warning</div>
<WhiteSpace ></WhiteSpace>
<div Button [icon]="'check-circle-o'">with icon</div>
<div Button [loading]="true" >loading</div>
<WhiteSpace ></WhiteSpace>
<div Button [icon]="'check-circle-o'">with icon</div>
<WhiteSpace ></WhiteSpace>
<div Button [icon]="img">
with custom icon
Expand Down
10 changes: 10 additions & 0 deletions components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,14 @@
> .@{buttonPrefixCls}-icon {
margin-right: 0.5em;
}

&-dashed {
.hairline-remove('all');
border: 1px dashed @color-text-disabled !important;

&.@{buttonPrefixCls}-disabled {
color: fade(@color-text-base-inverse, 60%);
opacity: 0.4;
}
}
}

1 comment on commit 8759db0

@Guoyuanqiang
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

close #270

Please sign in to comment.