Merge pull request #9339 from backstage/dependabot/npm_and_yarn/types/react-17.0.39

chore(deps-dev): bump @types/react from 16.14.18 to 17.0.39
This commit is contained in:
Ben Lambert
2022-02-09 18:29:02 +01:00
committed by GitHub
3 changed files with 13 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
chore: fixing typescript errors for `TabbedCard.tsx` for React 17.x
@@ -89,12 +89,15 @@ export function TabbedCard(props: PropsWithChildren<Props>) {
let selectedTabContent: ReactNode;
if (!value) {
React.Children.map(children, (child, index) => {
if (index === selectedIndex) selectedTabContent = child?.props.children;
if (React.isValidElement(child) && index === selectedIndex) {
selectedTabContent = child?.props.children;
}
});
} else {
React.Children.map(children, child => {
if (child?.props.value === value)
if (React.isValidElement(child) && child?.props.value === value) {
selectedTabContent = child?.props.children;
}
});
}
+3 -3
View File
@@ -6062,9 +6062,9 @@
"@types/react" "*"
"@types/react@*", "@types/react@>=16.9.0", "@types/react@^16.13.1 || ^17.0.0":
version "16.14.18"
resolved "https://registry.npmjs.org/@types/react/-/react-16.14.18.tgz#b2bcea05ee244fde92d409f91bd888ca8e54b20f"
integrity sha512-eeyqd1mqoG43mI0TvNKy9QNf1Tjz3DEOsRP3rlPo35OeMIt05I+v9RR8ZvL2GuYZeF2WAcLXJZMzu6zdz3VbtQ==
version "17.0.39"
resolved "https://registry.npmjs.org/@types/react/-/react-17.0.39.tgz#d0f4cde092502a6db00a1cded6e6bf2abb7633ce"
integrity sha512-UVavlfAxDd/AgAacMa60Azl7ygyQNRwC/DsHZmKgNvPmRR5p70AJ5Q9EAmL2NWOJmeV+vVUI4IAP7GZrN8h8Ug==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"