From fa39ce4eef5eaecb046d7c14a874a1134c804989 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Thu, 17 Jan 2019 13:14:50 +0200 Subject: [PATCH] fix: make example/defaults badge consistent with code blocks --- src/common-elements/fields.ts | 4 +++- src/components/Markdown/styled.elements.tsx | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common-elements/fields.ts b/src/common-elements/fields.ts index 5943e663d8..4fc3c12c71 100644 --- a/src/common-elements/fields.ts +++ b/src/common-elements/fields.ts @@ -18,7 +18,7 @@ export const ClickablePropertyNameCell = styled(PropertyNameCell)` export const FieldLabel = styled.span` vertical-align: middle; - font-size: 0.929em; + font-size: ${({ theme }) => theme.typography.code.fontSize}; line-height: 20px; `; @@ -79,6 +79,8 @@ export const ExampleValue = styled(FieldLabel)` margin: ${theme.spacing.unit}px; padding: 0 ${theme.spacing.unit}px; border: 1px solid ${transparentize(0.9, theme.colors.text.primary)}; + font-family: ${theme.typography.code.fontFamily}; + color: ${theme.typography.code.color}; }`}; & + & { margin-left: 0; diff --git a/src/components/Markdown/styled.elements.tsx b/src/components/Markdown/styled.elements.tsx index e0df9dcf50..5fefdc02f7 100644 --- a/src/components/Markdown/styled.elements.tsx +++ b/src/components/Markdown/styled.elements.tsx @@ -70,7 +70,7 @@ export const StyledMarkdownBlock = styled(PrismDiv as StyledComponent< font-family: ${props => props.theme.typography.code.fontFamily}; border-radius: 2px; border: 1px solid rgba(38, 50, 56, 0.1); - padding: 0.1em 0.25em 0.2em; + padding: 0 ${({ theme }) => theme.spacing.unit}px; font-size: ${props => props.theme.typography.code.fontSize}; font-weight: ${({ theme }) => theme.typography.code.fontWeight};