-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* convert to using chroma-js * update snapshots * addressing feedback * simplify logic, use new viz palette, add snippets * copy change * fix ze mobilez * [Viz color palette] Darken a few colors Colors 0, and 4-8 have been darkend to get closer to a ration of 3:1 though some still don’t quite make it passed 2:1 while still being color-blind acceptable * Increased brightness of vis palette for badges * cl * address feedback Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
- Loading branch information
1 parent
accdb66
commit fc3d292
Showing
23 changed files
with
366 additions
and
195 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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.