diff options
author | David Cho-Lerat <david.cho-lerat@sonarsource.com> | 2023-11-21 09:28:45 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2023-11-24 20:02:44 +0000 |
commit | 5002ce51d7ad9082f1066f5cadcb2ef23811f779 (patch) | |
tree | b94ef396d1b512110b05f055cfccc6e6422b2e2e /server/sonar-web/design-system/src/theme | |
parent | 59d2a44230c084ddd404a3035d2f93ec148d5c61 (diff) | |
download | sonarqube-5002ce51d7ad9082f1066f5cadcb2ef23811f779.tar.gz sonarqube-5002ce51d7ad9082f1066f5cadcb2ef23811f779.zip |
SONAR-21017 TypeScript: the `children` prop must now be explicit (see https://react.dev/blog/2022/03/08/react-18-upgrade-guide#updates-to-typescript-definitions)
Diffstat (limited to 'server/sonar-web/design-system/src/theme')
-rw-r--r-- | server/sonar-web/design-system/src/theme/withTheme.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/design-system/src/theme/withTheme.tsx b/server/sonar-web/design-system/src/theme/withTheme.tsx index 64e657fc57e..07713660df1 100644 --- a/server/sonar-web/design-system/src/theme/withTheme.tsx +++ b/server/sonar-web/design-system/src/theme/withTheme.tsx @@ -26,8 +26,8 @@ export interface ThemeProp { } export function withTheme<P>( - WrappedComponent: React.ComponentType<P & ThemeProp> -): React.ComponentType<P> { + WrappedComponent: React.ComponentType<React.PropsWithChildren<P & ThemeProp>>, +): React.ComponentType<React.PropsWithChildren<P>> { return function WrappedComponentWithTheme(props: P) { const theme = useTheme(); |