import { Button } from '@wordpress/components'; import SettingsBlock from './SettingsBlock'; import { Header, Title, Action, Description } from './SettingsBlockElements'; import TitleBadge from '../TitleBadge'; const FeatureSettingsBlock = ( { title, description, ...props } ) => { const printNotes = () => { const notes = props.actionProps?.notes; if ( ! notes || ( Array.isArray( notes ) && notes.length === 0 ) ) { return null; } return ( { notes.map( ( note, index ) => ( { note } ) ) } ); }; return ( { title } { props.actionProps?.enabled && ( ) } { description } { printNotes() } { props.actionProps?.buttons.map( ( button ) => ( { button.text } ) ) } ); }; export default FeatureSettingsBlock;