zucchetti-sa5/themes/onepirate/modules/form/FormButton.js

28 lines
536 B
JavaScript
Raw Permalink Normal View History

2022-10-28 11:41:58 +02:00
import * as React from 'react';
import PropTypes from 'prop-types';
import Button from '../components/Button';
import defer from './defer';
function FormButton(props) {
const { disabled, mounted, ...others } = props;
return (
<Button
disabled={!mounted || !!disabled}
type="submit"
variant="contained"
{...others}
/>
);
}
FormButton.propTypes = {
/**
* If `true`, the component is disabled.
*/
disabled: PropTypes.bool,
mounted: PropTypes.bool,
};
export default defer(FormButton);