From 0c08d9a6c2ce50e4bc3b8b5498626efff513bee1 Mon Sep 17 00:00:00 2001 From: jjchen1 Date: Tue, 16 Jul 2019 14:12:11 +0800 Subject: [PATCH] feat: add directive `v-ripple` fixes #267 --- components/ripple/README.md | 70 +++++++++++++++++++ components/ripple/index.js | 25 +++++++ docs/.vuepress/components/RippleDemo.vue | 36 ++++++++++ docs/.vuepress/components/ripple/MyButton.vue | 13 ++++ docs/.vuepress/enhanceApp.js | 2 + docs/components/README.md | 4 ++ 6 files changed, 150 insertions(+) create mode 100644 docs/.vuepress/components/RippleDemo.vue create mode 100644 docs/.vuepress/components/ripple/MyButton.vue diff --git a/components/ripple/README.md b/components/ripple/README.md index 72480261b..67097aa04 100644 --- a/components/ripple/README.md +++ b/components/ripple/README.md @@ -1,5 +1,75 @@ ## Ripple +Material Components Vue provides a customized directive `v-ripple` to provide any components with ripple effect. + +### Minimal Usage + +```html +Button +``` + +### Use primary color as ripple color + +```html +Button +``` + +### Use secondary color as ripple color + +```html +Button +``` + +### Customized your ripple using SASS + +```html + + + +``` + +### CSS-Only ripple + +```html +Button +``` + +### Activate or deactivate using binding value + +Notice that this usage can only be applied to Vue components instead of native elements like `
`, `