mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-19 14:14:17 +00:00
refactor: generalise modal footer style
This commit is contained in:
committed by
Carlos Valente
parent
ed4d0f060b
commit
27f99b4c87
@@ -1,6 +0,0 @@
|
|||||||
.buttonSection {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: $element-spacing;
|
|
||||||
margin-top: -$element-spacing;
|
|
||||||
}
|
|
||||||
@@ -15,8 +15,6 @@ import {
|
|||||||
|
|
||||||
import { setClientRemote } from '../../hooks/useSocket';
|
import { setClientRemote } from '../../hooks/useSocket';
|
||||||
|
|
||||||
import style from './ClientModal.module.scss';
|
|
||||||
|
|
||||||
interface RedirectClientModalProps {
|
interface RedirectClientModalProps {
|
||||||
id: string;
|
id: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
@@ -54,14 +52,12 @@ export function RedirectClientModal(props: RedirectClientModalProps) {
|
|||||||
</InputGroup>
|
</InputGroup>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<div className={style.buttonSection}>
|
<Button size='md' variant='ontime-subtle' onClick={onClose}>
|
||||||
<Button size='md' variant='ontime-subtle' onClick={onClose}>
|
Cancel
|
||||||
Cancel
|
</Button>
|
||||||
</Button>
|
<Button size='md' variant='ontime-filled' onClick={handleRedirect} isDisabled={!canSubmit}>
|
||||||
<Button size='md' variant='ontime-filled' onClick={handleRedirect} isDisabled={!canSubmit}>
|
Submit
|
||||||
Submit
|
</Button>
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ import {
|
|||||||
|
|
||||||
import { setClientRemote } from '../../hooks/useSocket';
|
import { setClientRemote } from '../../hooks/useSocket';
|
||||||
|
|
||||||
import style from './ClientModal.module.scss';
|
|
||||||
|
|
||||||
interface RenameClientModalProps {
|
interface RenameClientModalProps {
|
||||||
id: string;
|
id: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
@@ -53,14 +51,12 @@ export function RenameClientModal(props: RenameClientModalProps) {
|
|||||||
/>
|
/>
|
||||||
</ModalBody>
|
</ModalBody>
|
||||||
<ModalFooter>
|
<ModalFooter>
|
||||||
<div className={style.buttonSection}>
|
<Button size='md' variant='ontime-subtle' onClick={onClose}>
|
||||||
<Button size='md' variant='ontime-subtle' onClick={onClose}>
|
Cancel
|
||||||
Cancel
|
</Button>
|
||||||
</Button>
|
<Button size='md' variant='ontime-filled' onClick={handleRename} isDisabled={!canSubmit}>
|
||||||
<Button size='md' variant='ontime-filled' onClick={handleRename} isDisabled={!canSubmit}>
|
Submit
|
||||||
Submit
|
</Button>
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</ModalFooter>
|
</ModalFooter>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import { IoSwapVertical } from '@react-icons/all-files/io5/IoSwapVertical';
|
|||||||
import { navigatorConstants } from '../../../viewerConfig';
|
import { navigatorConstants } from '../../../viewerConfig';
|
||||||
import { isLocalhost, serverPort } from '../../api/constants';
|
import { isLocalhost, serverPort } from '../../api/constants';
|
||||||
import useClickOutside from '../../hooks/useClickOutside';
|
import useClickOutside from '../../hooks/useClickOutside';
|
||||||
import useElectronEvent from '../../hooks/useElectronEvent';
|
import { useElectronEvent } from '../../hooks/useElectronEvent';
|
||||||
import useInfo from '../../hooks-query/useInfo';
|
import useInfo from '../../hooks-query/useInfo';
|
||||||
import { useClientStore } from '../../stores/clientStore';
|
import { useClientStore } from '../../stores/clientStore';
|
||||||
import { useViewOptionsStore } from '../../stores/viewOptions';
|
import { useViewOptionsStore } from '../../stores/viewOptions';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
|
|
||||||
import { isLocalhost } from '../../../../common/api/constants';
|
import { isLocalhost } from '../../../../common/api/constants';
|
||||||
import useElectronEvent from '../../../../common/hooks/useElectronEvent';
|
import { useElectronEvent } from '../../../../common/hooks/useElectronEvent';
|
||||||
import * as Panel from '../../panel-utils/PanelUtils';
|
import * as Panel from '../../panel-utils/PanelUtils';
|
||||||
|
|
||||||
export default function ShutdownPanel() {
|
export default function ShutdownPanel() {
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ export const ontimeModal = {
|
|||||||
color: '#fefefe', // $gray-50
|
color: '#fefefe', // $gray-50
|
||||||
},
|
},
|
||||||
footer: {
|
footer: {
|
||||||
padding: '0.5rem',
|
padding: '1rem',
|
||||||
|
display: 'flex',
|
||||||
|
gap: '0.5rem',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user