mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-15 04:13:47 +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>
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { Box, IconButton } from '@chakra-ui/react';
|
|
import { FiX } from '@react-icons/all-files/fi/FiX';
|
|
import { editorEventId } from '../../common/atoms/LocalEventSettings';
|
|
import ErrorBoundary from '../../common/components/error-boundary/ErrorBoundary';
|
|
import { useAtom } from 'jotai';
|
|
|
|
import EventEditor from './EventEditor';
|
|
|
|
import style from '../editors/Editor.module.scss';
|
|
|
|
/* Styling for action buttons */
|
|
const closeBtnStyle = {
|
|
size: 'md',
|
|
variant: 'ghost',
|
|
colorScheme: 'white',
|
|
_hover: { bg: '#ebedf0', color: '#333' },
|
|
};
|
|
|
|
export default function InfoExport() {
|
|
const [openId, setOpenId] = useAtom(editorEventId);
|
|
|
|
return (
|
|
<Box className={`${style.eventEditor} ${!openId ? style.noEvent : ''}`}>
|
|
<ErrorBoundary>
|
|
<div className={style.eventEditorLayout}>
|
|
<EventEditor />
|
|
<div className={style.header}>
|
|
<IconButton
|
|
aria-label='Close Menu'
|
|
icon={<FiX />}
|
|
onClick={() => setOpenId(null)}
|
|
{...closeBtnStyle}
|
|
/>
|
|
</div>
|
|
|
|
</div>
|
|
</ErrorBoundary>
|
|
</Box>
|
|
);
|
|
}
|