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

How to custom the Button's text-color by theming? #1

Closed
Thammawat opened this issue Apr 3, 2018 · 6 comments
Closed

How to custom the Button's text-color by theming? #1

Thammawat opened this issue Apr 3, 2018 · 6 comments

Comments

@Thammawat
Copy link

No description provided.

@atanasster
Copy link
Owner

Hi, you can set the text color in the theme:

button: {
  colors: {
    text: xxx
  }
}

@Thammawat
Copy link
Author

Yeahhh. Thank you It's work.Amm... it can set Button's text-color in normal but how about to set text-color in ?

@atanasster
Copy link
Owner

If you mean the color on dark background, you cant currently

@Thammawat
Copy link
Author

Sorry for my last comment my question is how about to set text-color in primary button?

@atanasster
Copy link
Owner

np, was trying to guess the question :)

You cant directly change the text color for primary. You can change the background ex <Button color='accent-2' primary={true} label='Submit' onClick={() => {}} />
but the text color is taken from the global dark/light text colors global.colors.darkBackground.text and global.colors.lightBackground.text

Since the default brand color is treated as dark, you can change global.colors.darkBackground.text

<Button theme={{ global: { colors: { darkBackground: { text: 'red' } } } }} primary={true} label='Submit' onClick={() => {}} />

@Thammawat
Copy link
Author

Thank you vary much.

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