forked from mirrors/thatmattlove-hyperglass
improve as path component styling
This commit is contained in:
parent
777b117531
commit
2011892f72
1 changed files with 9 additions and 5 deletions
|
|
@ -8,7 +8,7 @@ import {
|
|||
Skeleton,
|
||||
ModalCloseButton,
|
||||
} from '@chakra-ui/react';
|
||||
import { useColorValue } from '~/context';
|
||||
import { useColorValue, useBreakpointValue } from '~/context';
|
||||
import { useLGState, useLGMethods } from '~/hooks';
|
||||
import { PathButton } from './button';
|
||||
import { Chart } from './chart';
|
||||
|
|
@ -22,14 +22,18 @@ export const Path = (props: TPath) => {
|
|||
const { isOpen, onClose, onOpen } = useDisclosure();
|
||||
const response = getResponse(device);
|
||||
const output = response?.output as TStructuredResponse;
|
||||
const bg = useColorValue('whiteSolid.50', 'blackSolid.900');
|
||||
|
||||
const bg = useColorValue('light.50', 'dark.900');
|
||||
const centered = useBreakpointValue({ base: false, lg: true }) ?? true;
|
||||
return (
|
||||
<>
|
||||
<PathButton onOpen={onOpen} />
|
||||
<Modal isOpen={isOpen} onClose={onClose} size="full" isCentered>
|
||||
<Modal isOpen={isOpen} onClose={onClose} size="full" isCentered={centered}>
|
||||
<ModalOverlay />
|
||||
<ModalContent bg={bg} maxW={{ base: '100%', lg: '80%' }} maxH={{ base: '80%', lg: '60%' }}>
|
||||
<ModalContent
|
||||
bg={bg}
|
||||
mt={{ base: 4, lg: '' }}
|
||||
maxH={{ base: '80%', lg: '60%' }}
|
||||
maxW={{ base: '100%', lg: '80%' }}>
|
||||
<ModalHeader>{`Path to ${displayTarget.value}`}</ModalHeader>
|
||||
<ModalCloseButton />
|
||||
<ModalBody>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue