import { Button, Popover } from '@wordpress/components'; import { useState } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import getIcon from '../../utils/get-icon'; /** * Component Class * * @param props */ export default function RemoveButton(props) { const [confirmed, setConfirmed] = useState(-1); const { onRemove, show, style, tooltipText = __('Remove Block?', 'ghostkit'), tooltipRemoveText = __('Remove', 'ghostkit'), tooltipCancelText = __('Cancel', 'ghostkit'), } = props; if (!show) { return null; } return ( ) : null} {getIcon('icon-trash')} ); }