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

feat(flat-button): add inverted tone #1175

Merged
merged 3 commits into from
Nov 13, 2019
Merged

Conversation

pa3
Copy link
Contributor

@pa3 pa3 commented Nov 12, 2019

  • Adds support of inverted tone to <FlatButton /> component. The use case for that is when <FlatButton /> is used in the white-on-dark (given default ui-kit theme is used, of course) sections of application.
  • Introduces font-color-for-text-when-inverted token

@@ -43,6 +43,14 @@ export const component = ({ themes }) => (
icon={<InformationIcon />}
/>
</Spec>
<Spec label="inverted">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Spec label="inverted">
<ThemeProvider theme={themes.darkTheme}>
<Spec label="inverted">
<ThemeProvider theme={customProperties>
<FlatButton
tone="inverted"
label="A label text"
onClick={() => {}}
icon={<InformationIcon />}
/>
<ThemeProvider>
</Spec>
</ThemeProvider>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also use listPropsOfNestedChild

Copy link
Contributor

@tdeekens tdeekens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now.

@@ -44,10 +45,20 @@ export const component = ({ themes }) => (
/>
</Spec>
<ThemeProvider theme={themes.darkTheme}>
<Spec label="secondary">
<Spec label="inverted" listPropsOfNestedChild>
<ThemeProvider theme={vars}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do this to "reset" the theme back to the original.

@montezume
Copy link
Contributor

stupid bot

@montezume montezume force-pushed the pa3-flat-button-inverted branch from 3cf413e to 6a55c14 Compare November 13, 2019 09:34
@kodiakhq kodiakhq bot merged commit a763a0b into master Nov 13, 2019
@kodiakhq kodiakhq bot deleted the pa3-flat-button-inverted branch November 13, 2019 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants