mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +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>
27 lines
747 B
React
27 lines
747 B
React
import { Button } from '@chakra-ui/react';
|
|
import { IoCheckmarkSharp } from '@react-icons/all-files/io5/IoCheckmarkSharp';
|
|
import { IoCloseSharp } from '@react-icons/all-files/io5/IoCloseSharp';
|
|
import PropTypes from 'prop-types';
|
|
|
|
export default function EnableBtn(props) {
|
|
const { active, text, actionHandler, size = 'xs' } = props;
|
|
return (
|
|
<Button
|
|
size={size}
|
|
leftIcon={active ? <IoCheckmarkSharp /> : <IoCloseSharp />}
|
|
colorScheme='blue'
|
|
variant={active ? 'solid' : 'outline'}
|
|
onClick={actionHandler}
|
|
>
|
|
{text}
|
|
</Button>
|
|
);
|
|
}
|
|
|
|
EnableBtn.propTypes = {
|
|
active: PropTypes.bool,
|
|
text: PropTypes.string,
|
|
actionHandler: PropTypes.func,
|
|
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']),
|
|
}
|