woocommerce/packages/js/components/src/abbreviated-card
Maikel David Pérez Gómez 7d0669dcb1
Add selection to the tree control (#36435)
* Create tree-control component

* Remove items from treeItemProps

* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add stories

* Add the type definitions

* Add use selection hook

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add selection logic to the tree control

* Create stories

* Add changelog file

* Fix linter error

* Add styles to fit the disign

* Highlight selected item when it's a single selection tree

* Rebasing from trunk

* Add comment suggestions

* Fix unit test errors due to a new version of @wordpress/compose related to the ResizeObserve feat
2023-02-28 15:10:12 -03:00
..
stories Moved WCA Packages 2022-03-18 14:25:26 -07:00
test Add selection to the tree control (#36435) 2023-02-28 15:10:12 -03: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