Commit afaf9b53 authored by tom's avatar tom Committed by isstuev

button theming

parent b7a534f4
import type { ComponentStyleConfig } from '@chakra-ui/theme'; import type { ComponentStyleConfig } from '@chakra-ui/theme';
import { mode } from '@chakra-ui/theme-tools';
import type { SystemStyleFunction } from '@chakra-ui/theme-tools';
const Button: ComponentStyleConfig = { const variantPrimary = {
baseStyle: { bg: 'blue.600',
fontWeight: 'normal', color: 'white',
}, fontWeight: 600,
variants: { _hover: {
primary: { bg: 'blue.400',
_disabled: {
bg: 'blue.600', bg: 'blue.600',
color: 'white',
fontWeight: 600,
_hover: {
bg: 'blue.400',
_disabled: {
bg: 'blue.600',
},
},
_disabled: {
opacity: 0.2,
},
},
secondary: {
bg: 'white',
color: 'blue.600',
fontWeight: 600,
borderColor: 'blue.600',
border: '2px solid',
_hover: {
color: 'blue.400',
borderColor: 'blue.400',
},
_disabled: {
opacity: 0.2,
},
}, },
iconBlue: { },
color: 'blue.600', _disabled: {
_hover: { opacity: 0.2,
color: 'blue.400', },
}, }
const variantSecondary = {
bg: 'white',
color: 'blue.600',
fontWeight: 600,
borderColor: 'blue.600',
border: '2px solid',
_hover: {
color: 'blue.400',
borderColor: 'blue.400',
},
_disabled: {
opacity: 0.2,
},
}
const variantIconBlue: SystemStyleFunction = (props) => {
return {
color: mode('blue.600', 'blue.300')(props),
_hover: {
color: mode('blue.400', 'blue.200')(props),
}, },
}
}
const variants = {
primary: variantPrimary,
secondary: variantSecondary,
iconBlue: variantIconBlue,
}
const Button: ComponentStyleConfig = {
baseStyle: {
fontWeight: 'normal',
}, },
variants,
sizes: { sizes: {
lg: { lg: {
h: 12, h: 12,
......
...@@ -10,12 +10,9 @@ const AddressLinkWithTooltip = ({ address }: {address: string}) => { ...@@ -10,12 +10,9 @@ const AddressLinkWithTooltip = ({ address }: {address: string}) => {
<HStack spacing={ 2 } alignContent="center" overflow="hidden"> <HStack spacing={ 2 } alignContent="center" overflow="hidden">
<Link <Link
href="#" href="#"
color="blue.500"
overflow="hidden" overflow="hidden"
fontWeight={ 600 } fontWeight={ 600 }
lineHeight="24px" lineHeight="24px"
// need theme
_hover={{ color: 'blue.400' }}
> >
<Tooltip label={ address }> <Tooltip label={ address }>
<Box overflow="hidden"><AddressWithDots address={ address }/></Box> <Box overflow="hidden"><AddressWithDots address={ address }/></Box>
......
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