Back to Woocommerce

AbbreviatedCard

packages/js/components/src/abbreviated-card/README.md

10.8.0-dev1.2 KB
Original Source

AbbreviatedCard

Use AbbreviatedCard to display an abbreviated card element.

Usage

jsx
import { Icon, box } from '@wordpress/icons';

<AbbreviatedCard
	href="#"
	icon={ <Icon icon={ page } /> }
	onClick={ () => alert( 'Abbreviated card clicked' ) }
>
	Content
</AbbreviatedCard>;

Props

NameTypeDefaultDescription
childrenReactNodenull(required) The children inside the abbreviated card, rendered in the component
classNameStringnullAdditional CSS classes
hrefStringnull(required) The resource to link to
iconElementnull(required) The element used to represent the icon for this card
onClickFunctionnullOn click handler called when the component is clicked
typeStringnullType of link