diff --git a/CHANGELOG.md b/CHANGELOG.md index 28797bffef2..95132597e04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Added `null` as acceptable `icon` prop for `EuiCard` ([#3470](https://github.com/elastic/eui/pull/3470)) - Added `sortBy` and `sortShift` props to `euiPaletteColorBlind()` for sorting along the color wheel ([#3387](https://github.com/elastic/eui/pull/3387)) - Added `utcOffset` prop to `EuiSuperDatePicker` ([#3436](https://github.com/elastic/eui/pull/3436)) - Added `partition` key to `EuiChartThemeType` for Partition chart support ([#3387](https://github.com/elastic/eui/pull/3387)) diff --git a/src/components/card/__snapshots__/card.test.tsx.snap b/src/components/card/__snapshots__/card.test.tsx.snap index 7fa1dacf78c..41eb65ad50b 100644 --- a/src/components/card/__snapshots__/card.test.tsx.snap +++ b/src/components/card/__snapshots__/card.test.tsx.snap @@ -27,6 +27,31 @@ exports[`EuiCard is rendered 1`] = ` `; +exports[`EuiCard props a null icon 1`] = ` +
+
+ + Card title + +
+

+ Card description +

+
+
+
+`; + exports[`EuiCard props children 1`] = `
{ expect(component).toMatchSnapshot(); }); + test('a null icon', () => { + const component = render( + + ); + + expect(component).toMatchSnapshot(); + }); + test('horizontal', () => { const component = render( & { description: NonNullable; /** - * Requires a node + * Accepts an `` node or `null` */ - icon?: ReactElement; + icon?: ReactElement | null; /** * Accepts a url in string form or ReactElement for a custom image component