import { __experimentalVStack as VStack, __experimentalText as Text, Card, CardBody, } from '@wordpress/components'; import { forwardRef } from 'react'; import ActionItem from './action-item'; import type { ActionListProps } from './types'; import './style.scss'; function UnforwardedActionList( { title, description, children }: ActionListProps, ref: React.ForwardedRef< HTMLDivElement > ) { return ( { ( title || description ) && ( { title && ( { title } ) } { description && ( { description } ) } ) } { children } ); } export const ActionList = Object.assign( forwardRef( UnforwardedActionList ), { /** * Renders a action item inside the `ActionList` component. */ ActionItem: Object.assign( ActionItem, { displayName: 'ActionList.ActionItem', } ), } ); export default ActionList;