Use theme values for OpenApiDefinition styles

Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
This commit is contained in:
Jonathan Roebuck
2024-10-15 14:07:11 +01:00
parent 943574b2d0
commit 0bd8730855
@@ -132,6 +132,48 @@ 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,
.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.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,
},
},
},
}));