Merge pull request #27140 from backstage/use-theme-for-api-definition-schema

Use theme values for OpenApiDefinition styles
This commit is contained in:
Patrik Oldsberg
2024-10-18 15:04:47 +02:00
committed by GitHub
2 changed files with 47 additions and 1 deletions
@@ -94,7 +94,8 @@ const useStyles = makeStyles(theme => ({
.errors small`]: {
color: theme.palette.text.secondary,
},
[`& .parameter__name.required:after`]: {
[`& .parameter__name.required:after,
.parameter__name.required span`]: {
color: theme.palette.warning.dark,
},
[`& table.model,
@@ -132,6 +133,46 @@ const useStyles = makeStyles(theme => ({
[`& span.prop-type`]: {
color: theme.palette.success.light,
},
[`& .opblock-control-arrow svg, .authorization__btn .unlocked`]: {
fill: theme.palette.text.primary,
},
[`& .json-schema-2020-12__title,
.json-schema-2020-12-keyword__name,
.json-schema-2020-12-property .json-schema-2020-12__title,
.json-schema-2020-12-keyword--description`]: {
color: theme.palette.text.primary,
},
[`.json-schema-2020-12-accordion__icon svg`]: {
fill: theme.palette.text.primary,
},
[`& .json-schema-2020-12-accordion,
.json-schema-2020-12-expand-deep-button`]: {
background: 'none',
appearance: 'none',
},
[`& .json-schema-2020-12-expand-deep-button,
.json-schema-2020-12-keyword__name--secondary,
.json-schema-2020-12-keyword__value--secondary,
.json-schema-2020-12__attribute--muted,
.json-schema-2020-12-keyword__value--const,
.json-schema-2020-12-keyword__value--warning`]: {
color: theme.palette.text.secondary,
},
[`& .json-schema-2020-12-body,
.json-schema-2020-12-keyword__value--const,
.json-schema-2020-12-keyword__value--warning`]: {
borderColor: theme.palette.text.secondary,
},
[`.json-schema-2020-12__constraint--string`]: {
backgroundColor: theme.palette.primary.main,
},
[`& .json-schema-2020-12__attribute--primary`]: {
color: theme.palette.primary.main,
},
[`& .json-schema-2020-12-property--required>.json-schema-2020-12:first-of-type>.json-schema-2020-12-head .json-schema-2020-12__title:after`]:
{
color: theme.palette.warning.dark,
},
},
},
}));