/** * External dependencies */ import { isEmpty } from 'lodash' /** * WordPress dependencies */ import { RichText, useBlockProps } from '@wordpress/block-editor' /** * Save block for display on front * * @param {Object} props This component's props. */ export default ( props ) => { const { steps, titleWrapper } = props.attributes if ( isEmpty( steps ) ) { return null } return (
{ steps.map( ( step, index ) => { if ( false === step.visible ) { return null } return (
{ step.title && ( ) } { step.content && ( ) }
) } ) }
) }