initial commit

This commit is contained in:
2021-12-10 12:03:04 +00:00
commit c46c7ddbf0
3643 changed files with 582794 additions and 0 deletions

View File

@ -0,0 +1,33 @@
/**
* External dependencies
*/
import classnames from 'classnames';
import PropTypes from 'prop-types';
const Form = ( {
className,
children,
onSubmit = ( event ) => void event,
} ) => {
const formOnSubmit = ( event ) => {
event.preventDefault();
onSubmit( event );
};
return (
<form
className={ classnames( 'wc-block-components-form', className ) }
onSubmit={ formOnSubmit }
>
{ children }
</form>
);
};
Form.propTypes = {
className: PropTypes.string,
children: PropTypes.node,
onSubmit: PropTypes.func,
};
export default Form;