Skip to content

Commit f9c5d62

Browse files
committed
chore: update styled components
1 parent 64ade2b commit f9c5d62

File tree

4 files changed

+1067
-70
lines changed

4 files changed

+1067
-70
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"react-router-dom": "^6.2.2",
3636
"react-scripts": "4.0.3",
3737
"react-scroll": "^1.8.7",
38-
"styled-components": "^5.3.3",
38+
"styled-components": "^6.0.0",
39+
"stylis": "^4.0.0",
3940
"typescript": "^4.6.2",
4041
"web-vitals": "^2.1.4",
4142
"yup": "^0.32.11"
@@ -71,6 +72,8 @@
7172
]
7273
},
7374
"devDependencies": {
75+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
76+
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
7477
"@craco/craco": "6.4.2",
7578
"@testing-library/jest-dom": "^5.16.2",
7679
"@testing-library/react": "^12.1.3",
@@ -81,7 +84,6 @@
8184
"@types/react-helmet": "^6.1.5",
8285
"@types/react-scroll": "^1.8.3",
8386
"@types/react-transition-group": "^4.4.5",
84-
"@types/styled-components": "^5.1.24",
8587
"@typescript-eslint/eslint-plugin": "^5.26.0",
8688
"@typescript-eslint/parser": "^5.26.0",
8789
"cz-conventional-changelog": "3.3.0",

src/common/components/BugDetail/AnchorButtons.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const AnchorButtons = ({
4343
placement="bottom"
4444
type="light"
4545
size="medium"
46-
onClick={(e) => {
46+
onClick={(e: { stopPropagation: () => void }) => {
4747
e.stopPropagation();
4848
}}
4949
>
@@ -69,7 +69,7 @@ export const AnchorButtons = ({
6969
placement="bottom"
7070
type="light"
7171
size="medium"
72-
onClick={(e) => {
72+
onClick={(e: { stopPropagation: () => void }) => {
7373
e.stopPropagation();
7474
}}
7575
>
@@ -94,7 +94,7 @@ export const AnchorButtons = ({
9494
placement="bottom"
9595
type="light"
9696
size="medium"
97-
onClick={(e) => {
97+
onClick={(e: { stopPropagation: () => void }) => {
9898
e.stopPropagation();
9999
}}
100100
>

src/pages/Bugs/Content/BugsTable/utils/mapBugsToTableData.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ import { getCustomStatusInfo } from 'src/common/components/utils/getCustomStatus
1414
import { BugTitle } from '../components/BugTitle';
1515
import { TableBugType } from '../../../types';
1616

17-
const AlignmentDiv = styled.div`
17+
const AlignmentDiv = styled.div<{ alignment?: TextAlign }>`
1818
height: 2em;
1919
display: flex;
20-
justify-content: ${(props: { alignment?: TextAlign }) =>
21-
props.alignment || 'center'};
20+
justify-content: ${({ alignment }) => alignment || 'center'};
2221
align-items: center;
2322
cursor: pointer;
2423
`;
@@ -59,7 +58,7 @@ export const mapBugsToTableData = (bugs: TableBugType[]) => {
5958
placement="bottom"
6059
type="light"
6160
size="medium"
62-
onClick={(e) => {
61+
onClick={(e: { stopPropagation: () => void }) => {
6362
e.stopPropagation();
6463
}}
6564
>
@@ -85,7 +84,7 @@ export const mapBugsToTableData = (bugs: TableBugType[]) => {
8584
placement="bottom"
8685
type="light"
8786
size="medium"
88-
onClick={(e) => {
87+
onClick={(e: { stopPropagation: () => void }) => {
8988
e.stopPropagation();
9089
}}
9190
>

0 commit comments

Comments
 (0)