File tree Expand file tree Collapse file tree 5 files changed +36
-3
lines changed Expand file tree Collapse file tree 5 files changed +36
-3
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ const useStyles = createStyles((theme, _params) => ({
15
15
alignContent : "center" ,
16
16
alignItems : "center" ,
17
17
cursor : "pointer" ,
18
+ transitionProperty : "all !important" ,
19
+
18
20
"&:hover" : {
19
21
color : theme . colors . dark [ 1 ] ,
20
22
borderColor : theme . colors . dark [ 1 ] ,
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ const useStyles = createStyles((theme) => ({
23
23
cursor : "pointer" ,
24
24
} ,
25
25
padding : theme . spacing . md ,
26
+ transition : ".35s ease" ,
27
+
26
28
[ theme . fn . smallerThan ( "sm" ) ] : {
27
29
padding : theme . spacing . sm ,
28
30
} ,
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ const useStyles = createStyles((theme) => ({
44
44
color : theme . colorScheme === "dark" ? theme . colors . dark [ 0 ] : theme . colors . gray [ 7 ] ,
45
45
fontSize : theme . fontSizes . sm ,
46
46
fontWeight : 500 ,
47
+ transition : "var(--btn-transition)" ,
47
48
48
49
"&:hover" : {
49
50
backgroundColor : theme . colorScheme === "dark" ? theme . colors . dark [ 6 ] : theme . colors . gray [ 0 ] ,
Original file line number Diff line number Diff line change @@ -2,7 +2,15 @@ import "../styles/globals.css";
2
2
import Head from "next/head" ;
3
3
import { useEffect , useState } from "react" ;
4
4
import { AppProps } from "next/app" ;
5
- import { ColorScheme , ColorSchemeProvider , MantineProvider } from "@mantine/core" ;
5
+ import {
6
+ ButtonStylesParams ,
7
+ ColorScheme ,
8
+ ColorSchemeProvider ,
9
+ CSSObject ,
10
+ MantineProvider ,
11
+ MantineTheme ,
12
+ MantineThemeOverride ,
13
+ } from "@mantine/core" ;
6
14
import BackToTopBtn from "../components/Molecules/BackToTopBtn/BackToTopBtn" ;
7
15
import Header from "../components/Organisms/Header/Header" ;
8
16
import Footer from "../components/Organisms/Footer/Footer" ;
@@ -38,6 +46,18 @@ function App({ Component, pageProps }: AppProps) {
38
46
} ,
39
47
] ;
40
48
49
+ const globalTheme : MantineThemeOverride = {
50
+ colorScheme : colorScheme ,
51
+ components : {
52
+ Button : {
53
+ styles : { root : { transition : "var(--btn-transition)" } } ,
54
+ } ,
55
+ ActionIcon : {
56
+ styles : { root : { transition : "var(--btn-transition)" } } ,
57
+ } ,
58
+ } ,
59
+ } ;
60
+
41
61
return (
42
62
< >
43
63
< Head >
@@ -53,7 +73,7 @@ function App({ Component, pageProps }: AppProps) {
53
73
</ Head >
54
74
55
75
< ColorSchemeProvider colorScheme = { colorScheme } toggleColorScheme = { toggleColorScheme } >
56
- < MantineProvider withGlobalStyles withNormalizeCSS theme = { { colorScheme } } emotionCache = { emotionCache } >
76
+ < MantineProvider withGlobalStyles withNormalizeCSS theme = { globalTheme } emotionCache = { emotionCache } >
57
77
< Header links = { links } />
58
78
< Component { ...pageProps } />
59
79
< Footer />
Original file line number Diff line number Diff line change 34
34
35
35
.hidden {
36
36
visibility : hidden;
37
- /* opacity: 0.1; */
38
37
}
39
38
39
+ /* ===============================
40
+ * CSS Variables
41
+ * =============================== */
42
+
43
+ : root {
44
+ --btn-transition : .35s ease
45
+ }
46
+
47
+
40
48
/* ===============================
41
49
* Global Animations
42
50
* =============================== */
You can’t perform that action at this time.
0 commit comments