Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Effect property on Button component #171

Closed
RubenZx opened this issue May 5, 2020 · 5 comments
Closed

Effect property on Button component #171

RubenZx opened this issue May 5, 2020 · 5 comments
Assignees

Comments

@RubenZx
Copy link

RubenZx commented May 5, 2020

About styles 🛠️

I have a problem setting this property to false, because the effect doesn't change.
If i'm not wrong, that property should change the effect on hover on the button component, and it will have no effect by setting to false.

Code:

<Button size="small" type="success" ghost effect={false}>
  MyButton
</Button>

Result

The button

@unix
Copy link
Member

unix commented May 5, 2020

Uh huh, yeah, the effect prop does not change the hover effect.

When the normal Button components are clicked, they will have animation effect like water waves. Prop effect is used of turn off the animation effect.
There's a little difference here, If the Button component is in special mode (ghost / loading / disabled ...), the animation is disabled.

@unix unix added the question label May 5, 2020
@unix unix self-assigned this May 5, 2020
@unix
Copy link
Member

unix commented May 5, 2020

I don't know if you noticed, If Button component has shadow prop, the hover effect is disabled.
If you just want to disable hover effect, this style (shadow) may help you?

@RubenZx
Copy link
Author

RubenZx commented May 5, 2020

Thanks for the explanation. I wanted the same that happens on shadow style, but without the shadow effect. I mean, i want a ghost button, but without any hover effect. I don't know if that is supported.

@unix
Copy link
Member

unix commented May 5, 2020

Currently, there is no plan to support disable some styles, but as an alternative, you can customize a Button component to implement this style.
I have an online example on codesendbox for you, Is this what you need?

@RubenZx
Copy link
Author

RubenZx commented May 5, 2020

Yeah, that's the best alternative, thank u so much! 😊

@RubenZx RubenZx closed this as completed May 5, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants