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 && ( <TitleBadge { ...props.actionProps?.badge } /> ) } { description } { printNotes() }
{ props.actionProps?.buttons.map( ( button ) => ( ) ) }
), ] } /> ); }; export default FeatureSettingsBlock;