Update @types/swagger-ui-react

This commit is contained in:
Dominik Henneke
2020-08-13 08:30:44 +02:00
parent bf76f07c06
commit f809238e61
3 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -45,7 +45,7 @@
"@testing-library/user-event": "^12.0.7",
"@types/jest": "^26.0.7",
"@types/node": "^12.0.0",
"@types/swagger-ui-react": "^3.23.2",
"@types/swagger-ui-react": "^3.23.3",
"jest-fetch-mock": "^3.0.3"
},
"files": [
@@ -32,10 +32,9 @@ export const OpenApiDefinitionWidget: FC<{
// TODO: This looks fine in the light theme, but wrong in dark mode. We need a custom stylesheet for swagger-ui.
// Till then, we add a white background to the swagger-ui to make it usable in dark mode.
// TODO: the typings do not allow a string while the component does (https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46654)
return (
<div style={{ backgroundColor: 'white' }}>
<SwaggerUI spec={(def as any) as object} />
<SwaggerUI spec={def} />
</div>
);
};