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: {
fontWeight: 'normal',
},
variants: {
primary: {
bg: 'blue.600', bg: 'blue.600',
color: 'white', color: 'white',
fontWeight: 600, fontWeight: 600,
...@@ -18,8 +15,9 @@ const Button: ComponentStyleConfig = { ...@@ -18,8 +15,9 @@ const Button: ComponentStyleConfig = {
_disabled: { _disabled: {
opacity: 0.2, opacity: 0.2,
}, },
}, }
secondary: {
const variantSecondary = {
bg: 'white', bg: 'white',
color: 'blue.600', color: 'blue.600',
fontWeight: 600, fontWeight: 600,
...@@ -32,14 +30,28 @@ const Button: ComponentStyleConfig = { ...@@ -32,14 +30,28 @@ const Button: ComponentStyleConfig = {
_disabled: { _disabled: {
opacity: 0.2, opacity: 0.2,
}, },
}, }
iconBlue: {
color: 'blue.600', const variantIconBlue: SystemStyleFunction = (props) => {
return {
color: mode('blue.600', 'blue.300')(props),
_hover: { _hover: {
color: 'blue.400', 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