Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
afaf9b53
Commit
afaf9b53
authored
Jul 11, 2022
by
tom
Committed by
isstuev
Jul 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
button theming
parent
b7a534f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
39 deletions
+48
-39
Button.ts
theme/components/Button.ts
+48
-36
AddressLinkWithTooltip.tsx
ui/shared/AddressLinkWithTooltip.tsx
+0
-3
No files found.
theme/components/Button.ts
View file @
afaf9b53
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
=
{
baseStyle
:
{
fontWeight
:
'
normal
'
,
},
variants
:
{
primary
:
{
const
variantPrimary
=
{
bg
:
'
blue.600
'
,
color
:
'
white
'
,
fontWeight
:
600
,
_hover
:
{
bg
:
'
blue.400
'
,
_disabled
:
{
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
'
,
_hover
:
{
color
:
'
blue.400
'
,
},
},
_disabled
:
{
opacity
:
0.2
,
},
}
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
:
{
lg
:
{
h
:
12
,
...
...
ui/shared/AddressLinkWithTooltip.tsx
View file @
afaf9b53
...
...
@@ -10,12 +10,9 @@ const AddressLinkWithTooltip = ({ address }: {address: string}) => {
<
HStack
spacing=
{
2
}
alignContent=
"center"
overflow=
"hidden"
>
<
Link
href=
"#"
color=
"blue.500"
overflow=
"hidden"
fontWeight=
{
600
}
lineHeight=
"24px"
// need theme
_hover=
{
{
color
:
'
blue.400
'
}
}
>
<
Tooltip
label=
{
address
}
>
<
Box
overflow=
"hidden"
><
AddressWithDots
address=
{
address
}
/></
Box
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment