From e5c51fb85e548e9a427367e8e3b8f44055f224f2 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Mon, 20 Jul 2015 16:45:02 -0500 Subject: [PATCH] let me see that button ripple --- .../button/extensions/material.scss | 17 +++++++++ ionic/components/button/test/basic/main.html | 35 ++++--------------- ionic/components/material/ripple.scss | 3 +- ionic/components/material/ripple.ts | 4 ++- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/ionic/components/button/extensions/material.scss b/ionic/components/button/extensions/material.scss index 0ee8fa8a68..86dc338799 100644 --- a/ionic/components/button/extensions/material.scss +++ b/ionic/components/button/extensions/material.scss @@ -43,4 +43,21 @@ $button-material-border-radius: 3px !default; font-size: $button-small-icon-size; } + @each $color, $value in $colors { + + &[#{$color}] { + + @if $color != "#fff" { + .md-ripple { + background-color: white; + } + } + + &:active, + &.activated { + opacity: 1; + background-color: get-color($color, base); + } + } + } } diff --git a/ionic/components/button/test/basic/main.html b/ionic/components/button/test/basic/main.html index 0fc92a5f91..ad4a960ba2 100644 --- a/ionic/components/button/test/basic/main.html +++ b/ionic/components/button/test/basic/main.html @@ -1,51 +1,30 @@
- a[button] - - - +
- a[primary] - - - +
- a[secondary] - - - +
- a[danger] - - - +
- a[light] - - - +
- a[stable] - - - +
- a[dark] - - - +
diff --git a/ionic/components/material/ripple.scss b/ionic/components/material/ripple.scss index 1cf6933265..12782f164f 100644 --- a/ionic/components/material/ripple.scss +++ b/ionic/components/material/ripple.scss @@ -7,8 +7,7 @@ $ripple-bg-color: black; $ripple-animation-curve: cubic-bezier(0, 0, 0.2, 1) !default; .md-ripple { - - background: #fff;//$ripple-bg-color; + background: $ripple-bg-color; border-radius: 50%; height: 50px; left: 0; diff --git a/ionic/components/material/ripple.ts b/ionic/components/material/ripple.ts index 3aebb80ffa..7a832888e1 100644 --- a/ionic/components/material/ripple.ts +++ b/ionic/components/material/ripple.ts @@ -117,7 +117,9 @@ export class MaterialRippleEffect { // Don't fire for the artificial "mouseup" generated by a double-click. if (event && event.detail !== 2) { - this.rippleElement.classList.remove('is-visible'); + setTimeout(() => { + this.rippleElement.classList.remove('is-visible'); + }) } }