import { Badge } from '@automattic/ui'; import { __experimentalVStack as VStack, __experimentalHStack as HStack, __experimentalText as Text, Button, Icon, } from '@wordpress/components'; import { chevronRight } from '@wordpress/icons'; import clsx from 'clsx'; import React, { forwardRef } from 'react'; import { SummaryButtonProps } from './types'; import './style.scss'; function BadgesList( { badges }: { badges: SummaryButtonProps[ 'badges' ] } ) { if ( ! badges?.length ) { return null; } return ( { badges?.map( ( badge ) => ( { badge.text } ) ) } ); } function UnforwardedSummaryButton( { title, href, decoration, description, strapline, badges, showArrow = true, onClick, disabled, density = 'low', ...props }: SummaryButtonProps, ref: React.ForwardedRef< HTMLAnchorElement | HTMLButtonElement > ) { const hasLowDensity = density === 'low'; return ( ); } export const SummaryButton = forwardRef( UnforwardedSummaryButton ); /** * The SummaryButton component provides a quick overview of a related page * (often settings). It includes a title, supporting description, and may * optionally display key field values or status indicators (e.g. a "2FA enabled" badge) * to surface the current state of settings at a glance. */ export default SummaryButton;