More EuiCard props and added accessibility
icon
#2566
Merged
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.
After viewing the accessibility PR changes to EuiCard in Kibana, there was a particular usage that needed some extra customization from the EUI side.
Kibana implementation
Added
titleSize
prop to EuiCardThis allows the shrinking of the title to better match a
large
size icon (vs axl
size icon). And in case the title is just too large beneath a particular heading.I'm restricting to only
s
andxs
(matches EuiTitle of the same sizing) so that the title can never be too large or too small compared to the description.Added
display
prop to EuiCardThe Kibana implementation uses EuiCard's within an EuiPanel which normall would be too many panels within panels. So in Kibana, they override the default EuiCard styles to remove the border and shadow.
I've added this as a property of EuiCard where the default is
display="panel"
but you can also set todisplay="plain"
which, as assumed just removes the border and shadow.I am purposefully not creating a docs example for this as most cases should use the panel style.
Added
accessibility
glyph to EuiIconI was altering a call out within the docs that was mentioning accessibility and I really just wanted to add the icon. So I finally created one.
Checklist
[ ] Checked for breaking changes and labeled appropriately[ ] Checked for accessibility including keyboard-only and screenreader modes