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

Add paddingSize prop to EuiCard and display example to docs #3638

Merged
merged 15 commits into from
Jul 2, 2020

Conversation

andreadelrio
Copy link
Contributor

@andreadelrio andreadelrio commented Jun 18, 2020

Summary

This PR adds the paddingSize prop to EuiCard and the example for the display prop to the docs.

image 26

Screenshot of different paddingSizes (s, m and l)
image

Notes:

  • I excluded the option for no padding from paddingSize because I think given the characteristics of the component, it wouldn't make sense to have cards with no padding whatsoever.

  • I didn't add an example for paddingSize since I saw that we don't usually do that (except for EuiPanel) but happy to add one if we think it's necessary.

Fixes #3552

Checklist

  • Check against all themes for compatibility in both light and dark modes
  • Checked in mobile
  • Checked in IE11 and Firefox
  • Props have proper autodocs
  • Added documentation
  • Checked Code Sandbox works for the any docs examples
  • Added or updated jest tests
    - [ ] Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3638/

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Thanks for adding the display example. I agree, I don't think we need the padding one and we can eventually rely on the Playground for that.

src-docs/src/views/card/card_example.js Outdated Show resolved Hide resolved
src-docs/src/views/card/card_display.js Outdated Show resolved Hide resolved
src/components/card/_card.scss Outdated Show resolved Hide resolved
src/components/card/card.tsx Outdated Show resolved Hide resolved
src/components/card/card.tsx Outdated Show resolved Hide resolved
src/components/card/card.tsx Outdated Show resolved Hide resolved
src-docs/src/views/card/card_example.js Outdated Show resolved Hide resolved
src/components/card/_card.scss Show resolved Hide resolved
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3638/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3638/

@andreadelrio andreadelrio requested a review from cchaos June 24, 2020 17:46
src-docs/src/views/card/card_example.js Outdated Show resolved Hide resolved
src-docs/src/views/card/card_example.js Outdated Show resolved Hide resolved
src/global_styling/variables/_card.scss Outdated Show resolved Hide resolved
src/components/card/_card.scss Outdated Show resolved Hide resolved
@andreadelrio andreadelrio requested a review from cchaos June 24, 2020 21:29
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3638/

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

Last round of comments.

src/components/card/card.tsx Outdated Show resolved Hide resolved
src/components/card/card.tsx Show resolved Hide resolved
src-docs/src/views/card/card_example.js Outdated Show resolved Hide resolved
src/components/card/_card.scss Outdated Show resolved Hide resolved
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3638/

@andreadelrio andreadelrio requested a review from cchaos June 26, 2020 21:24
Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

👍 Checked it locally by changing the default value of paddingSize, all the configurations still work (albeit don't all look great), but nothing breaks.

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_3638/

@andreadelrio andreadelrio merged commit 64b63c5 into elastic:master Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] Add EuiCard display prop example
4 participants