Commit 473f0ead authored by tom's avatar tom Committed by isstuev

model dark mode styling

parent afaf9b53
import { modalAnatomy as parts } from '@chakra-ui/anatomy'
import type { PartsStyleFunction, SystemStyleFunction } from '@chakra-ui/theme-tools'
import { mode } from '@chakra-ui/theme-tools'
import type { ComponentMultiStyleConfig } from '@chakra-ui/theme'; import type { ComponentMultiStyleConfig } from '@chakra-ui/theme';
const Modal: ComponentMultiStyleConfig = { const baseStyleDialog: SystemStyleFunction = (props) => {
parts: [ ], return {
sizes: {
md: {
dialog: {
maxW: '760px',
},
},
},
baseStyle: {
dialog: {
padding: 8, padding: 8,
borderRadius: 'lg', borderRadius: 'lg',
}, bg: mode('white', 'gray.800')(props),
header: { }
}
const baseStyleHeader = {
padding: 0, padding: 0,
marginBottom: 8, marginBottom: 8,
fontSize: '2xl', fontSize: '2xl',
lineHeight: 10, lineHeight: 10,
}, }
body: {
const baseStyleBody = {
padding: 0, padding: 0,
marginBottom: 8, marginBottom: 8,
}, }
footer: {
const baseStyleFooter = {
padding: 0, padding: 0,
justifyContent: 'flex-start', justifyContent: 'flex-start',
}, }
closeButton: {
const baseStyleCloseButton: SystemStyleFunction = (props) => {
return {
top: 8, top: 8,
right: 8, right: 8,
height: 10, height: 10,
width: 10, width: 10,
color: 'gray.700', color: mode('gray.700', 'gray.600')(props),
_hover: { color: 'blue.400' }, _hover: { color: 'blue.400' },
_active: { bg: 'none' }, _active: { bg: 'none' },
}
}
const baseStyle: PartsStyleFunction<typeof parts> = (props) => ({
dialog: baseStyleDialog(props),
header: baseStyleHeader,
body: baseStyleBody,
footer: baseStyleFooter,
closeButton: baseStyleCloseButton(props),
})
const sizes = {
md: {
dialog: {
maxW: '760px',
}, },
}, },
} }
const Modal: ComponentMultiStyleConfig = {
parts: parts.keys,
sizes,
baseStyle,
}
export default Modal; export default Modal;
...@@ -93,11 +93,11 @@ const AddressModal: React.FC<Props> = ({ data }) => { ...@@ -93,11 +93,11 @@ const AddressModal: React.FC<Props> = ({ data }) => {
<Grid templateColumns="repeat(3, max-content)" gap="20px 24px"> <Grid templateColumns="repeat(3, max-content)" gap="20px 24px">
{ NOTIFICATIONS.map((notification: string) => { { NOTIFICATIONS.map((notification: string) => {
return ( return (
<> <React.Fragment key={ notification }>
<GridItem>{ notification }</GridItem> <GridItem>{ notification }</GridItem>
<GridItem><Checkbox colorScheme="blue" size="lg">Incoming</Checkbox></GridItem> <GridItem><Checkbox colorScheme="blue" size="lg">Incoming</Checkbox></GridItem>
<GridItem><Checkbox colorScheme="blue" size="lg">Outgoing</Checkbox></GridItem> <GridItem><Checkbox colorScheme="blue" size="lg">Outgoing</Checkbox></GridItem>
</> </React.Fragment>
) )
}) } }) }
</Grid> </Grid>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment