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

[EuiCard] Allow custom component for image prop #3370

Merged
merged 11 commits into from
Apr 23, 2020

Conversation

TAYTS
Copy link
Contributor

@TAYTS TAYTS commented Apr 22, 2020

Summary

Issue: #3341
Added ReactElement to the EuiCard image prop to allow passing custom component.

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 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

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

@TAYTS TAYTS force-pushed the feature/flexible-image-prop-euicard branch from fd483b2 to e16b8df Compare April 22, 2020 05:12
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 @TAYTS .

Just a could suggestions. Also, can you update one of the image cards to pass a custom element. It can just be as simple as:

<EuiCard
  image={<div><img src="...unsplash source url..." /></div>}
  ...rest of the props...
</EuiCard>

src/components/card/_card.scss Outdated Show resolved Hide resolved
src/components/card/_card.scss 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
@TAYTS TAYTS requested a review from cchaos April 22, 2020 18:10
@cchaos
Copy link
Contributor

cchaos commented Apr 22, 2020

J, test this

@kibanamachine
Copy link

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

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 in IE, FF and Safari and the updated example still renders as it did. I'll just push a couple text updates then it will be good to merge! Thanks again @TAYTS

CHANGELOG.md Outdated Show resolved Hide resolved
src/components/card/card.tsx Outdated Show resolved Hide resolved
@cchaos
Copy link
Contributor

cchaos commented Apr 23, 2020

retest

@cchaos cchaos merged commit d38782b into elastic:master Apr 23, 2020
@TAYTS TAYTS deleted the feature/flexible-image-prop-euicard branch May 12, 2020 00:02
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.

3 participants