[EuiCard] Refactored to use EuiPanel#4649
Conversation
# Conflicts: # src/components/card/__snapshots__/card.test.tsx.snap # src/components/card/card.tsx
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
Also updating the testing in Kibana docs for quick copy/pastable snippets
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
Fix in #4659 |
Redirect affordance click
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4649/ |
In elastic/eui#4649 the `betaBadgeLabel` and related props have been removed from `EuiPanel` and it's now recommended to use an `EuiCard` instead. Replace these in APM and Observability plugins and update stories so examples can be viewed.
In elastic/eui#4649 the `betaBadgeLabel` and related props have been removed from `EuiPanel` and it's now recommended to use an `EuiCard` instead. Replace these in APM and Observability plugins and update stories so examples can be viewed.
In elastic/eui#4649 the `betaBadgeLabel` and related props have been removed from `EuiPanel` and it's now recommended to use an `EuiCard` instead. Replace these in APM and Observability plugins and update stories so examples can be viewed.
…6512) In elastic/eui#4649 the `betaBadgeLabel` and related props have been removed from `EuiPanel` and it's now recommended to use an `EuiCard` instead. Replace these in APM and Observability plugins and update stories so examples can be viewed. Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
Required some updates to how EuiPanel handles
divorbuttonBefore it was entirely linked to the existence of
onClick, but for cards' we need toonClick(but not focusable) on a div for accessibility reasons. So I've added the propelementwhich essentially allows consumer to force to either abuttonordiv. But internally, if this is not specified, will always choosebuttonifonClickexists.👉 [x]: In the props, the extended element only ever shows up as HTMLButton.
[EuiCard] Now supports more EuiPanel
coloroptions through the already existingdisplaypropScreen.Recording.2021-03-18.at.04.18.42.PM.mp4
Also fixes #4429 where Amsterdam's cards were not getting the empty shade background color
Updated some of EuiCard's props to be directly related to the
layoutdirectionThere are 4 props (
textAlign,footer,image, andselectable) that are not allowed when thelayout="horizontal", so the TS type is now setup this way in addition to the original and still existent console error. Closes #4485[EuiCheckableCard] Now Uses EuiSplitPanel
This really doesn't change any of the inner-workings of the component and only a slight adjustment to the aesthetics. In the default theme it adds a little more padding because it's now tied to the panel padding for all sides. And in Amsterdam, the default replaces the shadow for a border since likely this will be in a greater form and the shadow is too much.
Also fixes #3629, by applying the

onChangefunction to theonClickof the inner split panel that houses it.Added Panel nesting guidelines ❤️ @mdefazio
🔔 [BREAKING] Finally removed the beta badge props from EuiPanel
All three,
betaBadgeLabel,betaBadgeTooltipContent, andbetaBadgeTitleare now removed. The recommendation is to use EuiCard instead.For Elastic products, I've checked Cloud, which doesn't have any usages of these on the EuiPanel component. And I've got a local branch ready for the 3 places it's used in Kibana to update to use EuiCard instead.
Checklist