Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Unbounded modifier for Ripple #596

Open
meibegger opened this issue Apr 8, 2020 · 4 comments
Open

Unbounded modifier for Ripple #596

meibegger opened this issue Apr 8, 2020 · 4 comments

Comments

@meibegger
Copy link

Is your feature request related to a problem? Please describe.
In the MDC documentation (https://material.io/develop/web/components/ripples/) they mention, that there is a radius-unbounded mixin. When diving deeper into this, i found, that an unbounded option is already implemented in @material/ripple/_mixins.scss line 49.

Adding data-mdc-ripple-is-unbounded to the element with v-ripple works as expected.

Describe the solution you'd like
It would be nice to have a modifier unbounded on the ripple plugin.

@tychenjiajun
Copy link
Contributor

tychenjiajun commented Apr 8, 2020

Have you tried

<button v-ripple ref="ripple">Button</button> <!--ref name can be any string-->
this.$refs.ripple.mdcRipple.unbounded = true

@tychenjiajun
Copy link
Contributor

If both the js approach and the data-mdc-ripple-is-unbounded approach work. I don't see the benefit of making it part of the Vue directive.

@meibegger
Copy link
Author

No I haven't. But i prefer the data-attribute over the JS, because then i have all "options" in one place.
It would be nice to have a consistent way for specifying options and to expose all @material functionality.

@tychenjiajun
Copy link
Contributor

It will be confusing to make it a modifier. Consider the following

<button v-ripple.unbounded ref="ripple">Button</button> <!--ref name can be any string-->
this.$refs.ripple.mdcRipple.unbounded = false

Though the button has unbounded modifier, it's actually bounded. Make it part of the value will be more reasonable, like

<button v-ripple="{ unbounded: true }">Button</button>

There's might be more things that should be taken into considerations. So this feature won't be implemented soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants