Commit 8ea01744 authored by tom's avatar tom Committed by isstuev

inputs and table styles

parent e02bba1b
...@@ -22,8 +22,8 @@ const variantOutline: PartsStyleFunction<typeof parts> = (props) => { ...@@ -22,8 +22,8 @@ const variantOutline: PartsStyleFunction<typeof parts> = (props) => {
return { return {
field: { field: {
border: '2px solid', border: '2px solid',
borderColor: 'inherit',
bg: 'inherit', bg: 'inherit',
borderColor: mode('gray.100', 'whiteAlpha.200')(props),
_hover: { _hover: {
borderColor: mode('gray.300', 'whiteAlpha.400')(props), borderColor: mode('gray.300', 'whiteAlpha.400')(props),
}, },
...@@ -47,8 +47,8 @@ const variantOutline: PartsStyleFunction<typeof parts> = (props) => { ...@@ -47,8 +47,8 @@ const variantOutline: PartsStyleFunction<typeof parts> = (props) => {
}, },
addon: { addon: {
border: '2px solid', border: '2px solid',
borderColor: mode('inherit', 'whiteAlpha.50')(props), borderColor: mode('gray.100', 'whiteAlpha.200')(props),
bg: mode('gray.100', 'whiteAlpha.300')(props), bg: mode('gray.100', 'whiteAlpha.200')(props),
}, },
} }
} }
......
import type { tableAnatomy as parts } from '@chakra-ui/anatomy';
import type { ComponentMultiStyleConfig } from '@chakra-ui/theme'; import type { ComponentMultiStyleConfig } from '@chakra-ui/theme';
import { mode } from '@chakra-ui/theme-tools';
import type { PartsStyleFunction } from '@chakra-ui/theme-tools';
const variantSimple: PartsStyleFunction<typeof parts> = (props) => {
return {
th: {
border: 0,
color: mode('gray.500', 'gray.50')(props),
},
thead: {
backgroundColor: mode('gray.50', 'whiteAlpha.100')(props),
},
td: {
borderColor: mode('gray.200', 'whiteAlpha.200')(props),
},
}
}
const Table: ComponentMultiStyleConfig = { const Table: ComponentMultiStyleConfig = {
parts: [ 'th', 'td', 'table' ], parts: [ 'th', 'td', 'table', 'thead' ],
baseStyle: { baseStyle: {
thead: { thead: {
backgroundColor: 'gray.50', backgroundColor: 'gray.50',
...@@ -38,14 +56,7 @@ const Table: ComponentMultiStyleConfig = { ...@@ -38,14 +56,7 @@ const Table: ComponentMultiStyleConfig = {
}, },
}, },
variants: { variants: {
simple: { simple: variantSimple,
th: {
border: 0,
},
td: {
borderColor: 'gray.200',
},
},
}, },
} }
......
import React from 'react'; import React from 'react';
import { HStack, InputGroup, Input, InputLeftAddon, InputLeftElement, Center, Switch, useColorMode } from '@chakra-ui/react'; import { HStack, InputGroup, Input, InputLeftAddon, InputLeftElement, Center, Switch, useColorMode, useColorModeValue } from '@chakra-ui/react';
import { SearchIcon } from '@chakra-ui/icons' import { SearchIcon } from '@chakra-ui/icons'
import Identicon from 'react-identicons'; import Identicon from 'react-identicons';
...@@ -26,7 +26,7 @@ const Header = () => { ...@@ -26,7 +26,7 @@ const Header = () => {
<Input paddingInlineStart="50px" placeholder="Search by addresses / transactions /block/ token ... "/> <Input paddingInlineStart="50px" placeholder="Search by addresses / transactions /block/ token ... "/>
</InputGroup> </InputGroup>
<Switch size="lg" onChange={ toggleColorMode }/> <Switch size="lg" onChange={ toggleColorMode }/>
<Center minWidth="50px" width="50px" height="50px" bg="blackAlpha.100" borderRadius="50%" overflow="hidden"> <Center minWidth="50px" width="50px" height="50px" bg={ useColorModeValue('blackAlpha.100', 'white') } borderRadius="50%" overflow="hidden">
{ /* the displayed size is 40px, but we need to generate x2 for retina displays */ } { /* the displayed size is 40px, but we need to generate x2 for retina displays */ }
<Identicon className={ styles.identicon } string="randomness" size={ 80 }/> <Identicon className={ styles.identicon } string="randomness" size={ 80 }/>
</Center> </Center>
......
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