File tree Expand file tree Collapse file tree 4 files changed +142
-121
lines changed Expand file tree Collapse file tree 4 files changed +142
-121
lines changed Original file line number Diff line number Diff line change 39
39
"lint" : " eslint . --ext .js,.ts,.tsx"
40
40
},
41
41
"peerDependencies" : {
42
- "react" : " >=16.0.0"
42
+ "react" : " >=16.0.0" ,
43
+ "styled-components" : " >=5.0.0"
43
44
},
44
45
"devDependencies" : {
45
46
"@babel/plugin-transform-react-jsx-self" : " ^7.16.7" ,
46
47
"@babel/plugin-transform-react-jsx-source" : " ^7.16.7" ,
47
- "@emotion/react" : " ^11.8.2" ,
48
- "@emotion/styled" : " ^11.8.1" ,
49
48
"@testing-library/jest-dom" : " ^5.16.3" ,
50
49
"@testing-library/react" : " ^13.0.0" ,
51
50
"@testing-library/user-event" : " ^14.0.4" ,
52
51
"@types/jest" : " ^27.4.1" ,
53
52
"@types/node" : " ^17.0.23" ,
54
53
"@types/react" : " ^17.0.43" ,
55
54
"@types/react-dom" : " ^17.0.14" ,
55
+ "@types/styled-components" : " ^5.1.24" ,
56
56
"@typescript-eslint/eslint-plugin" : " ^5.18.0" ,
57
57
"@typescript-eslint/parser" : " ^5.18.0" ,
58
58
"babel-eslint" : " ^10.0.3" ,
Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
- import { Global , css } from '@emotion/react' ;
3
2
import * as S from './styles' ;
4
3
5
4
const KEY_CODE = {
@@ -178,15 +177,7 @@ const ReactInputVerificationCode = ({
178
177
179
178
return (
180
179
< React . Fragment >
181
- < Global
182
- styles = { css `
183
- : root {
184
- --ReactInputVerificationCode-itemWidth : 4.5rem ;
185
- --ReactInputVerificationCode-itemHeight : 5rem ;
186
- --ReactInputVerificationCode-itemSpacing : 1rem ;
187
- }
188
- ` }
189
- />
180
+ < S . GlobalStyle />
190
181
191
182
< S . Container
192
183
className = 'ReactInputVerificationCode__container'
Original file line number Diff line number Diff line change 1
- import styled from '@emotion/styled' ;
1
+ import styled , { createGlobalStyle } from 'styled-components' ;
2
+
3
+ export const GlobalStyle = createGlobalStyle `
4
+ :root {
5
+ --ReactInputVerificationCode-itemWidth: 4.5rem;
6
+ --ReactInputVerificationCode-itemHeight: 5rem;
7
+ --ReactInputVerificationCode-itemSpacing: 1rem;
8
+ }
9
+ ` ;
2
10
3
11
interface ContainerProps {
4
12
itemsCount : number ;
You can’t perform that action at this time.
0 commit comments