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

Secondary colored button #249

Closed
nbob opened this issue Jun 15, 2018 · 5 comments
Closed

Secondary colored button #249

nbob opened this issue Jun 15, 2018 · 5 comments

Comments

@nbob
Copy link

nbob commented Jun 15, 2018

How can I create a flat Button colored with secondary(accent) color?

@whyjay17
Copy link

I just added a className and used mixins to change the style.

<Button className="secondaryButton" flat >Secondary</Button>

and in your styles.scss, add

.secondaryButton { @include mdc-button-ink-color($secondaryText); }

But I am pretty sure there will be a striaghtforward way to do it.

For now, just do this.

@jamesmfriedman
Copy link
Collaborator

If you look at the button page in the docs there is an example using the theme prop.

@jamesmfriedman
Copy link
Collaborator

@nbob were you able to get your button?

Also, feel free to use the Gitter chat for questions that aren't really issues with the library.

@nbob
Copy link
Author

nbob commented Jun 18, 2018

Yes, I see theme prop, but it does not affect on ripple color
Ripple colored primary

@jamesmfriedman
Copy link
Collaborator

The Buttons (as well as anything else that has a Ripple) accepts all of the Ripple props as well. Here is the solution, sorry for the delayed reply. I'll update the docs accordingly.

<Button flat theme="secondary" accent>With Theme</Button>

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

3 participants