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
8ea01744
Commit
8ea01744
authored
Jul 09, 2022
by
tom
Committed by
isstuev
Jul 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inputs and table styles
parent
e02bba1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
14 deletions
+25
-14
Input.ts
theme/components/Input.ts
+3
-3
Table.ts
theme/components/Table.ts
+20
-9
Header.tsx
ui/header/Header.tsx
+2
-2
No files found.
theme/components/Input.ts
View file @
8ea01744
...
...
@@ -22,8 +22,8 @@ const variantOutline: PartsStyleFunction<typeof parts> = (props) => {
return
{
field
:
{
border
:
'
2px solid
'
,
borderColor
:
'
inherit
'
,
bg
:
'
inherit
'
,
borderColor
:
mode
(
'
gray.100
'
,
'
whiteAlpha.200
'
)(
props
),
_hover
:
{
borderColor
:
mode
(
'
gray.300
'
,
'
whiteAlpha.400
'
)(
props
),
},
...
...
@@ -47,8 +47,8 @@ const variantOutline: PartsStyleFunction<typeof parts> = (props) => {
},
addon
:
{
border
:
'
2px solid
'
,
borderColor
:
mode
(
'
inherit
'
,
'
whiteAlpha.5
0
'
)(
props
),
bg
:
mode
(
'
gray.100
'
,
'
whiteAlpha.
3
00
'
)(
props
),
borderColor
:
mode
(
'
gray.100
'
,
'
whiteAlpha.20
0
'
)(
props
),
bg
:
mode
(
'
gray.100
'
,
'
whiteAlpha.
2
00
'
)(
props
),
},
}
}
...
...
theme/components/Table.ts
View file @
8ea01744
import
type
{
tableAnatomy
as
parts
}
from
'
@chakra-ui/anatomy
'
;
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
=
{
parts
:
[
'
th
'
,
'
td
'
,
'
table
'
],
parts
:
[
'
th
'
,
'
td
'
,
'
table
'
,
'
thead
'
],
baseStyle
:
{
thead
:
{
backgroundColor
:
'
gray.50
'
,
...
...
@@ -38,14 +56,7 @@ const Table: ComponentMultiStyleConfig = {
},
},
variants
:
{
simple
:
{
th
:
{
border
:
0
,
},
td
:
{
borderColor
:
'
gray.200
'
,
},
},
simple
:
variantSimple
,
},
}
...
...
ui/header/Header.tsx
View file @
8ea01744
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
Identicon
from
'
react-identicons
'
;
...
...
@@ -26,7 +26,7 @@ const Header = () => {
<
Input
paddingInlineStart=
"50px"
placeholder=
"Search by addresses / transactions /block/ token ... "
/>
</
InputGroup
>
<
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 */
}
<
Identicon
className=
{
styles
.
identicon
}
string=
"randomness"
size=
{
80
}
/>
</
Center
>
...
...
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