renames client to admin, sets up component library

This commit is contained in:
James
2020-10-10 18:28:17 -04:00
parent e88be6b251
commit 84191ec8fd
397 changed files with 2042 additions and 579 deletions

View File

@@ -0,0 +1,33 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useForm, useFormProcessing } from '../Form/context';
import Button from '../../elements/Button';
import './index.scss';
const baseClass = 'form-submit';
const FormSubmit = ({ children }) => {
const processing = useFormProcessing();
const { disabled } = useForm();
return (
<div className={baseClass}>
<Button
type="submit"
disabled={processing || disabled ? true : undefined}
>
{children}
</Button>
</div>
);
};
FormSubmit.propTypes = {
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node,
]).isRequired,
};
export default FormSubmit;

View File

@@ -0,0 +1,5 @@
form > .form-submit {
.btn {
width: 100%;
}
}