import React from 'react'; import { Flex, Padded, Text } from '@buffetjs/core'; import { BaselineAlignment, LoadingIndicator, Row } from 'strapi-helper-plugin'; import PropTypes from 'prop-types'; import Bloc from '../Bloc'; const FormBloc = ({ children, actions, isLoading, title, subtitle }) => ( {isLoading ? ( <> ) : ( <> {title && ( <> {title} {subtitle && ( {subtitle} )} {actions} )} {children} )} ); FormBloc.defaultProps = { actions: null, isLoading: false, subtitle: null, title: null, }; FormBloc.propTypes = { actions: PropTypes.any, children: PropTypes.node.isRequired, isLoading: PropTypes.bool, subtitle: PropTypes.string, title: PropTypes.string, }; export default FormBloc;