-
Notifications
You must be signed in to change notification settings - Fork 843
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
Add card graphics #1338
Add card graphics #1338
Conversation
cf79193
to
8e8017c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about moving the SVG-specific code out into a new component (card_svg.js ?) and letting that component be passed in to EuiCard
? It will help bundle size in the future when we have efficient splitting, and is more flexible in what can be used at the footer of the card.
@chandlerprall This PR is ready for a fresh review. I've moved the svg to its own component, as suggested. |
@chandlerprall I've made the requested changes for future code splitting concerns. Ready for another look, thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
@cchaos This is ready for a fresh review. I've also tweaked the colors a bit to better see the second wave on the light theme. Ideally, we would use different color values on that particular path in the svg depending upon the active theme, but Dave noted that while there is a ticket for such a detection mechanism, it does not yet exist. I think, after this latest tweaking, it's a good balance between the two themes for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #1334
Summary
In preparation for Kibana home page changes, this PR add an optional svg graphic to cards.
An example card using this prop has been intentionally left off the EuiCard docs page as it should only be used in select cases.
Light theme
Dark theme
Kibana home sample
Checklist
Documentation examples were addedJest tests were updated or added to match the most common scenariosThis was checked against keyboard-only and screenreader scenarios