woocommerce/packages/js/components/src/abbreviated-card
Christopher Allford d2d8d78be1 Moved WCA Packages
This commit moves all of the packages in
`plugins/woocommerce-admin/packages` to their
new home in `packages/js`.
2022-03-18 14:25:26 -07:00
..
stories Moved WCA Packages 2022-03-18 14:25:26 -07:00
test Moved WCA Packages 2022-03-18 14:25:26 -07:00
README.md Moved WCA Packages 2022-03-18 14:25:26 -07:00
index.js Moved WCA Packages 2022-03-18 14:25:26 -07:00
style.scss Moved WCA Packages 2022-03-18 14:25:26 -07:00

README.md

AbbreviatedCard

Use AbbreviatedCard to display an abbreviated card element.

Usage

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

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

Props

Name Type Default Description
children ReactNode null (required) The children inside the abbreviated card, rendered in the component
className String null Additional CSS classes
href String null (required) The resource to link to
icon Element null (required) The element used to represent the icon for this card
onClick Function null On click handler called when the component is clicked
type String null Type of link