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
9413a344
Commit
9413a344
authored
Sep 07, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transition and shadow tokens
parent
404cb56c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
transition.ts
theme/foundations/transition.ts
+15
-0
index.ts
theme/index.ts
+2
-0
getOutlinedFieldStyles.ts
theme/utils/getOutlinedFieldStyles.ts
+1
-1
ColorModeToggler.tsx
ui/blocks/header/ColorModeToggler.tsx
+3
-3
No files found.
theme/foundations/transition.ts
0 → 100644
View file @
9413a344
const
transitionDuration
=
{
'
ultra-fast
'
:
'
50ms
'
,
faster
:
'
100ms
'
,
fast
:
'
150ms
'
,
normal
:
'
200ms
'
,
slow
:
'
300ms
'
,
slower
:
'
400ms
'
,
'
ultra-slow
'
:
'
500ms
'
,
};
const
transition
=
{
duration
:
transitionDuration
,
};
export
default
transition
;
theme/index.ts
View file @
9413a344
...
...
@@ -5,6 +5,7 @@ import config from './config';
import
borders
from
'
./foundations/borders
'
;
import
breakpoints
from
'
./foundations/breakpoints
'
;
import
colors
from
'
./foundations/colors
'
;
import
transition
from
'
./foundations/transition
'
;
import
typography
from
'
./foundations/typography
'
;
import
global
from
'
./global
'
;
...
...
@@ -18,6 +19,7 @@ const overrides = {
global
,
},
breakpoints
,
transition
,
};
export
default
extendTheme
(
overrides
);
theme/utils/getOutlinedFieldStyles.ts
View file @
9413a344
...
...
@@ -35,7 +35,7 @@ export default function getOutlinedFieldStyles(props: StyleFunctionProps) {
_focusVisible
:
{
zIndex
:
1
,
borderColor
:
getColor
(
theme
,
fc
),
boxShadow
:
'
0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06)
'
,
boxShadow
:
'
md
'
,
},
_placeholder
:
{
color
:
mode
(
'
blackAlpha.600
'
,
'
whiteAlpha.600
'
)(
props
),
...
...
ui/blocks/header/ColorModeToggler.tsx
View file @
9413a344
...
...
@@ -49,12 +49,12 @@ const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((props, ref)
boxSizing
:
'
content-box
'
,
cursor
:
'
pointer
'
,
...
transitionProps
,
transitionDuration
:
'
500ms
'
,
transitionDuration
:
'
ultra-slow
'
,
}),
[
trackBg
,
transitionProps
]);
const
thumbStyles
:
SystemStyleObject
=
React
.
useMemo
(()
=>
({
bg
:
thumbBg
,
boxShadow
:
'
0px 4px 8px rgba(0, 0, 0, 0.1)
'
,
boxShadow
:
'
md
'
,
width
:
'
24px
'
,
height
:
'
24px
'
,
borderRadius
:
'
md
'
,
...
...
@@ -62,7 +62,7 @@ const ColorModeToggler = forwardRef<ColorModeTogglerProps, 'input'>((props, ref)
transform
:
state
.
isChecked
?
'
translate(44px, 4px)
'
:
'
translate(4px, 4px)
'
,
...
transitionProps
,
transitionProperty
:
'
background-color, transform
'
,
transitionDuration
:
'
500ms
'
,
transitionDuration
:
'
ultra-slow
'
,
}),
[
thumbBg
,
transitionProps
,
state
.
isChecked
]);
return
(
...
...
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