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 3939 "lint" : " eslint . --ext .js,.ts,.tsx"
4040 },
4141 "peerDependencies" : {
42- "react" : " >=16.0.0"
42+ "react" : " >=16.0.0" ,
43+ "styled-components" : " >=5.0.0"
4344 },
4445 "devDependencies" : {
4546 "@babel/plugin-transform-react-jsx-self" : " ^7.16.7" ,
4647 "@babel/plugin-transform-react-jsx-source" : " ^7.16.7" ,
47- "@emotion/react" : " ^11.8.2" ,
48- "@emotion/styled" : " ^11.8.1" ,
4948 "@testing-library/jest-dom" : " ^5.16.3" ,
5049 "@testing-library/react" : " ^13.0.0" ,
5150 "@testing-library/user-event" : " ^14.0.4" ,
5251 "@types/jest" : " ^27.4.1" ,
5352 "@types/node" : " ^17.0.23" ,
5453 "@types/react" : " ^17.0.43" ,
5554 "@types/react-dom" : " ^17.0.14" ,
55+ "@types/styled-components" : " ^5.1.24" ,
5656 "@typescript-eslint/eslint-plugin" : " ^5.18.0" ,
5757 "@typescript-eslint/parser" : " ^5.18.0" ,
5858 "babel-eslint" : " ^10.0.3" ,
Original file line number Diff line number Diff line change 11import * as React from 'react' ;
2- import { Global , css } from '@emotion/react' ;
32import * as S from './styles' ;
43
54const KEY_CODE = {
@@ -178,15 +177,7 @@ const ReactInputVerificationCode = ({
178177
179178 return (
180179 < 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 />
190181
191182 < S . Container
192183 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+ ` ;
210
311interface ContainerProps {
412 itemsCount : number ;
You can’t perform that action at this time.
0 commit comments