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

Allow any <color> value in EuiIcon #1370

Merged
merged 4 commits into from
Dec 13, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
## [`master`](https://github.com/elastic/eui/tree/master)

- Reinstate ([#1353](https://github.com/elastic/eui/pull/1353)) `onBlur` action on `EuiComboBox` ([#1364](https://github.com/elastic/eui/pull/1364))
- Convert roughly half of the services to TypeScript ([#1400](https://github.com/elastic/eui/pull/1400))
- Convert roughly half of the services to TypeScript ([#1360](https://github.com/elastic/eui/pull/1360))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This pointed at the wrong place


**Bug fixes**

- Fixed `onCreateOption` callback of `EuiComboBox` so it isn't called when the input is empty ([#1364](https://github.com/elastic/eui/pull/1364))
- Added `anchorClassName` prop to `EuiPopover` ([#1367](https://github.com/elastic/eui/pull/1367))
- Added support for `fullWidth` on `EuiSuperSelect` ([#1367](https://github.com/elastic/eui/pull/1367))
- Applied new scrollbar customization for Firefox ([#1367](https://github.com/elastic/eui/pull/1367))
- Allow any color value to be passed to `EuiIcon` ([#1370](https://github.com/elastic/eui/pull/1370))

## [`5.7.0`](https://github.com/elastic/eui/tree/v5.7.0)

Expand Down
7 changes: 4 additions & 3 deletions src-docs/src/views/icon/icon_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,10 @@ export const IconExample = {
text: (
<p>
Use the <EuiCode>color</EuiCode> prop to assign a color for your icons. It
can accept named colors from our pallete or a three or six color hex code.
The default behavior is to inherit the text color as the SVG
color <EuiCode>fill</EuiCode> property via <EuiCode>currentColor</EuiCode> in CSS.
can accept named colors from our palette, a three or six color hex code,
and rgb(r, g, b) or rgba(r, g, b, a) formats. The default behavior is to
inherit the text color as the SVG color <EuiCode>fill</EuiCode> property
via <EuiCode>currentColor</EuiCode> in CSS.
chandlerprall marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add an example of the rgba/hsla to the docs icon_colors.js

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, the autodoc could use a note now. Right now it just says string or enum.

Copy link
Contributor

Choose a reason for hiding this comment

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

@chandlerprall You can pull from one of my examples in the screenshot I pasted.

Copy link
Contributor

Choose a reason for hiding this comment

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

Although, I pasted in a link in my docs suggestion re-write that points to all the valid color types. Maybe we should just reference that and not put more examples of things we don't want people to do in our docs?

Copy link
Contributor

Choose a reason for hiding this comment

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

It also has way more examples of what is/isn't a valid color type.

</p>
),
demo: <IconColors />,
Expand Down
24 changes: 4 additions & 20 deletions src/components/accordion/__snapshots__/accordion.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@ exports[`EuiAccordion behavior closes when clicked twice 1`] = `
className="euiIcon euiIcon--medium"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -76,11 +72,7 @@ exports[`EuiAccordion behavior closes when clicked twice 1`] = `
className="euiIcon euiIcon--medium"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -204,11 +196,7 @@ exports[`EuiAccordion behavior opens when clicked once 1`] = `
className="euiIcon euiIcon--medium"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -218,11 +206,7 @@ exports[`EuiAccordion behavior opens when clicked once 1`] = `
className="euiIcon euiIcon--medium"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,7 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
className="euiIcon euiIcon--medium euiButtonEmpty__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -346,11 +342,7 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
className="euiIcon euiIcon--medium euiButtonEmpty__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -428,11 +420,7 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
className="euiIcon euiIcon--medium euiButtonIcon__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -443,11 +431,7 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
className="euiIcon euiIcon--medium euiButtonIcon__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -572,11 +556,7 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
className="euiIcon euiIcon--medium euiButtonIcon__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -587,11 +567,7 @@ exports[`EuiInMemoryTable behavior pagination 1`] = `
className="euiIcon euiIcon--medium euiButtonIcon__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,11 +588,7 @@ exports[`EuiSuperSelect props more props are propogated to each option 2`] = `
className="euiIcon euiIcon--medium euiFormControlLayoutCustomIcon__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -603,11 +599,7 @@ exports[`EuiSuperSelect props more props are propogated to each option 2`] = `
className="euiIcon euiIcon--medium euiFormControlLayoutCustomIcon__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -749,11 +741,7 @@ exports[`EuiSuperSelect props more props are propogated to each option 2`] = `
className="euiIcon euiIcon--medium euiContextMenu__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -762,11 +750,7 @@ exports[`EuiSuperSelect props more props are propogated to each option 2`] = `
className="euiIcon euiIcon--medium euiContextMenu__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -829,11 +813,7 @@ exports[`EuiSuperSelect props more props are propogated to each option 2`] = `
className="euiIcon euiIcon--medium euiContextMenu__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand All @@ -842,11 +822,7 @@ exports[`EuiSuperSelect props more props are propogated to each option 2`] = `
className="euiIcon euiIcon--medium euiContextMenu__icon"
focusable="false"
height="16"
style={
Object {
"fill": undefined,
}
}
style={null}
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Loading