From c8fd900afbbd86859f1de670364f731bc6cfdecd Mon Sep 17 00:00:00 2001 From: Scott Guymer Date: Wed, 28 Jun 2023 21:47:45 +0200 Subject: [PATCH 1/2] fix: Use themeable styling for markdown Signed-off-by: Scott Guymer --- .../components/Form/DescriptionFieldTemplate.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/scaffolder-react/src/next/components/Form/DescriptionFieldTemplate.tsx b/plugins/scaffolder-react/src/next/components/Form/DescriptionFieldTemplate.tsx index 8debfb3e08..4c86ef0c62 100644 --- a/plugins/scaffolder-react/src/next/components/Form/DescriptionFieldTemplate.tsx +++ b/plugins/scaffolder-react/src/next/components/Form/DescriptionFieldTemplate.tsx @@ -24,17 +24,17 @@ import { StrictRJSFSchema, } from '@rjsf/utils'; -const useStyles = makeStyles({ +const useStyles = makeStyles(theme => ({ markdownDescription: { - fontSize: '0.75rem', + fontSize: theme.typography.caption.fontSize, margin: 0, - marginTop: '5px', - color: 'rgba(0, 0, 0, 0.54)', - '& p:first-child': { + color: theme.palette.text.secondary, + '& :first-child': { margin: 0, + marginTop: '3px', // to keep the standard browser padding }, }, -}); +})); /** The `DescriptionField` is the template to use to render the description of a field * @alpha From f74a27de4d2ca66ada290d4dc330e0189581b9e4 Mon Sep 17 00:00:00 2001 From: Scott Guymer Date: Wed, 28 Jun 2023 21:53:35 +0200 Subject: [PATCH 2/2] Added changeset Signed-off-by: Scott Guymer --- .changeset/fluffy-frogs-change.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fluffy-frogs-change.md diff --git a/.changeset/fluffy-frogs-change.md b/.changeset/fluffy-frogs-change.md new file mode 100644 index 0000000000..2caf25bfc4 --- /dev/null +++ b/.changeset/fluffy-frogs-change.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-react': patch +--- + +Made markdown description theme-able