mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-06 16:03:52 +00:00
de9a7a87fd
* refactor(project structure): UI * refactor(project structure): extract utilities * refactor(project structure): remove unused * refactor(project structure): electron * refactor(project structure): server refactor: migrate to vitest refactor: monorepo config * refactor: extract application menu * refactor: exit process * refactor: extract tray menu * chore: electron build * Added Seconds in studio clock #282 --------- Co-authored-by: Fabian Posenau <fabian@fphome.de> --------- Co-authored-by: Fabian Posenau <fabian.p99@gmx.de> Co-authored-by: Fabian Posenau <fabian@fphome.de>
36 lines
790 B
React
36 lines
790 B
React
import { Button } from '@chakra-ui/react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import style from './Modals.module.scss';
|
|
|
|
export default function SubmitContainer(props) {
|
|
const { submitting, changed, revert, status } = props;
|
|
|
|
return (
|
|
<div className={style.submitContainer}>
|
|
<Button
|
|
isDisabled={submitting || !changed}
|
|
variant='ghosted'
|
|
onClick={revert}
|
|
>
|
|
Revert
|
|
</Button>
|
|
<Button
|
|
colorScheme='blue'
|
|
type='submit'
|
|
isLoading={submitting}
|
|
disabled={!changed || status !== 'success'}
|
|
>
|
|
Save
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
SubmitContainer.propTypes = {
|
|
submitting: PropTypes.bool,
|
|
changed: PropTypes.bool,
|
|
status: PropTypes.string,
|
|
revert: PropTypes.func.isRequired,
|
|
};
|