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
6222efeb
Commit
6222efeb
authored
Jul 18, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update moon icon and active state of thumb
parent
6ae0770e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
moon.svg
icons/moon.svg
+3
-0
ColorModeToggler.module.css
ui/header/ColorModeToggler.module.css
+2
-2
ColorModeToggler.tsx
ui/header/ColorModeToggler.tsx
+5
-3
No files found.
icons/moon.svg
0 → 100644
View file @
6222efeb
<svg
width=
"16"
height=
"16"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M15.557 7.712a.75.75 0 0 1 .442.729A7.983 7.983 0 1 1 7.526 0a.75.75 0 0 1 .548 1.308l-.18.161a4.675 4.675 0 0 0 6.619 6.603l.207-.207a.75.75 0 0 1 .837-.154Zm-1.446 2.504a6.176 6.176 0 0 1-8.373-8.311 6.481 6.481 0 0 0-2.282 10.657 6.482 6.482 0 0 0 10.655-2.346Z"
fill=
"currentColor"
/>
</svg>
\ No newline at end of file
ui/header/ColorModeToggler.module.css
View file @
6222efeb
...
@@ -35,11 +35,11 @@
...
@@ -35,11 +35,11 @@
height
:
24px
;
height
:
24px
;
border-radius
:
12px
;
border-radius
:
12px
;
position
:
absolute
;
position
:
absolute
;
transform
:
translate
(
4px
,
4px
);
transform
:
translate
(
4
4
px
,
4px
);
}
}
.thumb
[
data-checked
]
{
.thumb
[
data-checked
]
{
transform
:
translate
(
4
4
px
,
4px
);
transform
:
translate
(
4px
,
4px
);
}
}
.nightIcon
{
.nightIcon
{
...
...
ui/header/ColorModeToggler.tsx
View file @
6222efeb
...
@@ -12,9 +12,10 @@ import {
...
@@ -12,9 +12,10 @@ import {
}
from
'
@chakra-ui/system
'
}
from
'
@chakra-ui/system
'
import
{
dataAttr
,
__DEV__
}
from
'
@chakra-ui/utils
'
import
{
dataAttr
,
__DEV__
}
from
'
@chakra-ui/utils
'
import
*
as
React
from
'
react
'
import
*
as
React
from
'
react
'
import
{
SunIcon
,
MoonIcon
}
from
'
@chakra-ui/icons
'
import
{
SunIcon
}
from
'
@chakra-ui/icons
'
import
{
useColorMode
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
useColorMode
,
useColorModeValue
,
Icon
}
from
'
@chakra-ui/react
'
;
import
getDefaultTransitionProps
from
'
../../theme/utils/getDefaultTransitionProps
'
;
import
getDefaultTransitionProps
from
'
../../theme/utils/getDefaultTransitionProps
'
;
import
moonIcon
from
'
../../icons/moon.svg
'
;
import
styles
from
'
./ColorModeToggler.module.css
'
;
import
styles
from
'
./ColorModeToggler.module.css
'
;
...
@@ -63,9 +64,10 @@ export const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((prop
...
@@ -63,9 +64,10 @@ export const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((prop
className=
{
styles
.
track
}
className=
{
styles
.
track
}
__css=
{
trackStyles
}
__css=
{
trackStyles
}
>
>
<
Moon
Icon
<
Icon
className=
{
styles
.
nightIcon
}
className=
{
styles
.
nightIcon
}
boxSize=
{
4
}
boxSize=
{
4
}
as=
{
moonIcon
}
color=
{
useColorModeValue
(
'
blue.600
'
,
'
white
'
)
}
color=
{
useColorModeValue
(
'
blue.600
'
,
'
white
'
)
}
{
...
transitionProps
}
{
...
transitionProps
}
/>
/>
...
...
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