Skip to content
This repository was archived by the owner on Feb 28, 2023. It is now read-only.

Commit 85be464

Browse files
raphparesimardo
authored andcommitted
Add ripple prop to m-icon-button (#85)
1 parent de61d5f commit 85be464

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/components/icon-button/icon-button.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
'm--is-skin-dark': isSkinDark,
55
'm--is-skin-primary': isSkinPrimary,
66
'm--is-skin-secondary': isSkinSecondary,
7+
'm--has-ripple': ripple,
78
'm--is-disabled': disabled }"
89
:disabled="disabled"
910
type="button"

src/components/icon-button/icon-button.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
outline: none;
1515
}
1616

17+
&.m--has-ripple {
18+
&::before {
19+
content: '';
20+
}
21+
}
22+
1723
&:not(.m--is-disabled) {
1824
&.m--is-skin-light,
1925
&.m--is-skin-link,
@@ -26,7 +32,6 @@
2632
top: 50%;
2733
left: 50%;
2834
z-index: 0;
29-
content: '';
3035
display: block;
3136
width: $m-touch-size / 2;
3237
height: $m-touch-size / 2;

src/components/icon-button/icon-button.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export class MIconButton extends Vue {
3434
public iconName: string;
3535
@Prop({ default: '20px' })
3636
public iconSize: string;
37+
@Prop({ default: true })
38+
public ripple: boolean;
3739
@Prop()
3840
public title: string;
3941

0 commit comments

Comments
 (0)