fix(fab): add styles for disabled

fixes #14867
This commit is contained in:
Manu Mtz.-Almeida
2018-07-28 17:45:45 +02:00
parent 7a0545d477
commit 520da8d373
3 changed files with 10 additions and 6 deletions

View File

@ -20,6 +20,7 @@
font-size: 14px;
}
:host(.activated) {
--background: #{current-color(tint)};
}
@ -40,6 +41,8 @@
border: 0;
outline: none;
background: var(--background);
background-clip: padding-box;
color: inherit;
@ -63,11 +66,12 @@
z-index: 0;
font-kerning: none;
appearance: none;
}
&:active,
&:focus {
outline: none;
}
.fab-button-native[disabled] {
cursor: default;
opacity: .5;
pointer-events: none;
}
::slotted(ion-icon) {

View File

@ -76,7 +76,7 @@ export class FabButton {
hostData() {
return {
'tappable': true,
'tappable': !this.disabled,
class: {
...createColorClasses(this.color),
...this.getFabClassMap(),

View File

@ -24,7 +24,7 @@
<pre id="log" style="right:10px; bottom:50px; text-shadow: 0 0 2px rgba(0, 0, 0, 0.24);" slot="fixed">log</pre>
<ion-button>Test</ion-button>
<ion-fab-button>FAB</ion-fab-button>
<ion-fab-button disabled>FAB</ion-fab-button>
<ion-fab vertical="top" horizontal="end" edge id="fab1" slot="fixed">
<ion-fab-button onclick="clickMainFAB('fab1')" mini class="e2eFabTopRight">