Skip to content

Allow passing node to the image props for EuiCard #3341

@TAYTS

Description

@TAYTS

[Feature propose]
Allow user to pass custom image component to image props in the EuiCard.
The use case is that if a user want to have progressive image loading, it can be simply just pass the custom component to the image props.

One possible approach to achieve this that I could think off is to check the type of the image props and decide whether to render the normal <img /> or the custom component that the user has passed.

let imageNode;
if (image && layout === 'vertical') {
imageNode = <img className="euiCard__image" src={image} alt="" />;
}

I can help out this feature if this proposal is acceptable!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions