Skip to content

[EuiCard] Allow custom component for image prop#3370

Merged
cchaos merged 11 commits intoelastic:masterfrom
TAYTS:feature/flexible-image-prop-euicard
Apr 23, 2020
Merged

[EuiCard] Allow custom component for image prop#3370
cchaos merged 11 commits intoelastic:masterfrom
TAYTS:feature/flexible-image-prop-euicard

Conversation

@TAYTS
Copy link
Copy Markdown
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
Copy Markdown

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

@TAYTS TAYTS requested a review from cchaos April 22, 2020 18:10
@cchaos
Copy link
Copy Markdown
Contributor

cchaos commented Apr 22, 2020

J, test this

@kibanamachine
Copy link
Copy Markdown

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

Copy link
Copy Markdown
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

@cchaos
Copy link
Copy Markdown
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