EditorialCard
The EditorialCard component is a versatile and customizable card component that can be used to display different types of content such as images, titles, text, and card footers. It supports custom link rendering and provides focus and hover states.
Importing
To import the EditorialCard component, use the following import statement:
_10import { EditorialCard } from '@ef-global/backpack/EditorialCard';
Props
The following props can be passed to the EditorialCard component:
children: An array of elements, which can includeCardImage,Text,CardTitle,CardBody, andCardFooter.renderCustomLink(optional): A custom link component to be used instead of the defaultLinkcomponent.href(optional): The URL to navigate to when the card or footer link is clicked.target(optional): The target attribute for the link, e.g.,_blankto open the link in a new window.
Usage
To use the EditorialCard component, provide the required child components as children prop and any optional props as needed:
_10<EditorialCard href="https://example.com" target="_blank">_10 <CardImage src="image.jpg" alt="Image description" />_10 <CardTitle>Title</CardTitle>_10 <CardBody>Body text</CardBody>_10 <CardFooter>Footer content</CardFooter>_10</EditorialCard>
Examples
Here's an example of using the EditorialCard component:
_10<EditorialCard_10 href="https://example.com"_10>_10 <CardImage src="image.jpg" alt="Image description" aspectRatios={{ s: "1/1" }} />_10 <CardTitle>Title</CardTitle>_10 <CardBody>Body text</CardBody>_10 <CardFooter>Footer content</CardFooter>_10</EditorialCard>
)