File tree Expand file tree Collapse file tree 3 files changed +49
-9
lines changed Expand file tree Collapse file tree 3 files changed +49
-9
lines changed Original file line number Diff line number Diff line change 1
- import styles from '@/styles/Title.module.scss' ;
1
+ // import styles from '@/styles/Title.module.scss';
2
+ import styled from 'styled-components' ;
2
3
3
- const Title = ( { title, customClass } ) => {
4
+ export const TitleStyle = styled . h2 `
5
+ color: red;
6
+ ` ;
7
+
8
+ const Title = ( { title } ) => {
4
9
return (
5
- < h2
6
- className = {
7
- customClass ? `${ styles . title } ${ styles [ customClass ] } ` : styles . title
8
- }
9
- >
10
- { title }
11
- </ h2 >
10
+ < div >
11
+ < TitleStyle > { title } </ TitleStyle >
12
+ </ div >
12
13
) ;
13
14
} ;
14
15
15
16
export default Title ;
17
+
18
+ // const Title = ({ title, customClass }) => {
19
+ // return (
20
+ // <h2
21
+ // className={
22
+ // customClass ? `${styles.title} ${styles[customClass]}` : styles.title
23
+ // }
24
+ // >
25
+ // {title}
26
+ // </h2>
27
+ // );
28
+ // };
29
+
30
+ // export default Title;
Original file line number Diff line number Diff line change @@ -19,4 +19,26 @@ module.exports = withPWA({
19
19
} ,
20
20
] ,
21
21
} ,
22
+ compiler : {
23
+ // see https://styled-components.com/docs/tooling#babel-plugin for more info on the options.
24
+ styledComponents :
25
+ true |
26
+ {
27
+ // Enabled by default in development, disabled in production to reduce file size,
28
+ // setting this will override the default for all environments.
29
+ displayName : true ,
30
+ // Enabled by default.
31
+ ssr : true ,
32
+ // Enabled by default.
33
+ fileName : true ,
34
+ // Empty by default.
35
+ topLevelImportPaths : '' ,
36
+ // Defaults to ["index"].
37
+ meaninglessFileNames : '' ,
38
+ // Enabled by default.
39
+ cssProp : true ,
40
+ // Empty by default.
41
+ namespace : '' ,
42
+ } ,
43
+ } ,
22
44
} ) ;
Original file line number Diff line number Diff line change 37
37
"lint-staged" : " ^13.0.3" ,
38
38
"prettier" : " ^2.7.1" ,
39
39
"prettylint" : " ^1.0.0"
40
+ },
41
+ "resolutions" : {
42
+ "styled-components" : " ^5"
40
43
}
41
44
}
You can’t perform that action at this time.
0 commit comments