-
Notifications
You must be signed in to change notification settings - Fork 860
Improve badge colors #2455
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
Merged
Merged
Improve badge colors #2455
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3284fa1
convert to using chroma-js
ryankeairns abe908c
update snapshots
ryankeairns 38e934f
addressing feedback
ryankeairns b12a07f
simplify logic, use new viz palette, add snippets
ryankeairns 8b537bb
copy change
ryankeairns 242908e
fix ze mobilez
ryankeairns de300fa
Merge branch 'master' into rk/badge-colors
ryankeairns 7e30126
Merge branch 'master' into rk/badge-colors
ryankeairns e42d2b4
[Viz color palette] Darken a few colors
4e13902
Increased brightness of vis palette for badges
3ac6906
cl
f1e15a1
address feedback
ryankeairns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,45 @@ | ||
| import React from 'react'; | ||
|
|
||
| import { EuiBadge } from '../../../../src/components'; | ||
| import { | ||
| EuiBadge, | ||
| EuiFlexGroup, | ||
| EuiFlexItem, | ||
| } from '../../../../src/components'; | ||
|
|
||
| export default () => ( | ||
| <div> | ||
| <EuiBadge | ||
| color="#333" | ||
| onClick={() => window.alert('Badge clicked')} | ||
| onClickAriaLabel="Example of onclick event for the button" | ||
| data-test-sub="testExample1"> | ||
| onClick on badge itself | ||
| </EuiBadge> | ||
|
|
||
| <EuiBadge | ||
| iconType="cross" | ||
| iconSide="right" | ||
| color="#333" | ||
| iconOnClick={() => window.alert('Icon inside badge clicked')} | ||
| iconOnClickAriaLabel="Example of onclick event for icon within the button" | ||
| data-test-sub="testExample2"> | ||
| onClick on icon within badge | ||
| </EuiBadge> | ||
|
|
||
| <EuiBadge | ||
| iconType="cross" | ||
| iconSide="right" | ||
| color="#333" | ||
| onClick={() => window.alert('Badge clicked')} | ||
| onClickAriaLabel="Example of onclick event for the button" | ||
| iconOnClick={() => window.alert('Icon inside badge clicked')} | ||
| iconOnClickAriaLabel="Example of onclick event for icon within the button" | ||
| data-test-sub="testExample3"> | ||
| onClick on itself and the icon | ||
| </EuiBadge> | ||
| </div> | ||
| <EuiFlexGroup wrap responsive={false} gutterSize="xs"> | ||
| <EuiFlexItem grow={false}> | ||
| <EuiBadge | ||
| color="primary" | ||
| onClick={() => window.alert('Badge clicked')} | ||
| onClickAriaLabel="Example of onClick event for the button" | ||
| data-test-sub="testExample1"> | ||
| onClick on text within badge | ||
| </EuiBadge> | ||
| </EuiFlexItem> | ||
| <EuiFlexItem grow={false}> | ||
| <EuiBadge | ||
| color="hollow" | ||
| iconType="cross" | ||
| iconSide="right" | ||
| iconOnClick={() => window.alert('Icon inside badge clicked')} | ||
| iconOnClickAriaLabel="Example of onClick event for icon within the button" | ||
| data-test-sub="testExample2"> | ||
| onClick on icon within badge | ||
| </EuiBadge> | ||
| </EuiFlexItem> | ||
| <EuiFlexItem grow={false}> | ||
| <EuiBadge | ||
| color="secondary" | ||
| iconType="cross" | ||
| iconSide="right" | ||
| onClick={() => window.alert('Badge clicked')} | ||
| onClickAriaLabel="Example of onClick event for the button" | ||
| iconOnClick={() => window.alert('Icon inside badge clicked')} | ||
| iconOnClickAriaLabel="Example of onClick event for icon within the button" | ||
| data-test-sub="testExample3"> | ||
| onClick on both text and icon within badge | ||
| </EuiBadge> | ||
| </EuiFlexItem> | ||
| </EuiFlexGroup> | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.