Skip to content

Commit

Permalink
Fix light mode for rule builder
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoenig committed Feb 15, 2022
1 parent 5f85d87 commit 76a5690
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion components/builder/left-column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
SimpleGrid,
Spacer,
Text,
useColorModeValue,
} from '@chakra-ui/react'
import React from 'react'
import { useTranslation } from 'react-i18next'
Expand All @@ -28,7 +29,7 @@ const LeftColumn = (props: Props) => {

return (
<Box
bg="gray.700"
bg={useColorModeValue('gray.200', 'gray.700')}
px="10"
py="5"
minWidth="350"
Expand Down
3 changes: 2 additions & 1 deletion components/builder/right-column/overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
Th,
Thead,
Tr,
useColorModeValue,
useDisclosure,
} from '@chakra-ui/react'
import React from 'react'
Expand Down Expand Up @@ -47,7 +48,7 @@ const Overview = (props: Props) => {
</Button>
</Box>
{props.customRule.description !== '' && <Text mb="5">{props.customRule.description}</Text>}
<Box backgroundColor="gray.700" borderRadius="5" mb="10">
<Box backgroundColor={useColorModeValue('gray.200', 'gray.700')} borderRadius="5" mb="10">
<Box display="flex" alignItems="center" flexDirection="row" m="5">
<Text flex="1" fontWeight="semibold">
{t('builder.rules.immunization')}
Expand Down
4 changes: 2 additions & 2 deletions components/builder/right-column/rule.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Button, Flex, Text } from '@chakra-ui/react'
import { Box, Button, Flex, Text, useColorModeValue } from '@chakra-ui/react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { CertificateRule, immunizationTypeName } from '../../../utils/certlogic'
Expand All @@ -13,7 +13,7 @@ type Props = {
const Rule = (props: Props) => {
const { t } = useTranslation('common')
return (
<Box borderRadius="10" backgroundColor="gray.700" padding="5">
<Box borderRadius="10" backgroundColor={useColorModeValue('gray.200', 'gray.700')} padding="5">
<Flex>
<Box flex="1" display="flex" flexDireaction="row" alignItems="center">
<Box>
Expand Down
2 changes: 1 addition & 1 deletion pages/builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const BuilderPage = () => {
return (
<>
<PageMeta allowIndex={false} />
<Flex color="white" height="100vh">
<Flex height="100vh">
<LeftColumn
customRule={currentCustomRule}
onCreate={onCreate}
Expand Down
2 changes: 1 addition & 1 deletion utils/builder-state-rules-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
{
"lang": "de",
"desc": "Die Probenahme für einen NAA-Test (z.B. PCR) darf maximal 72 Stunden zurückliegen."
"desc": "Die Probenahme für einen NAA-Test (z.B. PCR) darf maximal 48 Stunden zurückliegen."
}
],
"validTo": 48
Expand Down

0 comments on commit 76a5690

Please sign in to comment.