From f8b793d2dca8c9d63694b1abe332176c9ae315e2 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Mon, 28 May 2018 21:47:37 +0300 Subject: [PATCH] feat: new theme colors: code and codeBg --- src/common-elements/headers.ts | 1 - src/components/Markdown/styles.ts | 4 ++-- src/theme.ts | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common-elements/headers.ts b/src/common-elements/headers.ts index 4409b0f4..4797b2d3 100644 --- a/src/common-elements/headers.ts +++ b/src/common-elements/headers.ts @@ -18,7 +18,6 @@ export const headerCommonMixin = level => css` export const H1 = styled.h1` ${headerCommonMixin(1)}; color: ${props => props.theme.colors.main}; - text-transform: capitalize; `; export const H2 = styled.h2` diff --git a/src/components/Markdown/styles.ts b/src/components/Markdown/styles.ts index da7a4427..8108aaba 100644 --- a/src/components/Markdown/styles.ts +++ b/src/components/Markdown/styles.ts @@ -30,8 +30,8 @@ export const markdownCss = css` } code { - color: #e53935; - background-color: rgba(38, 50, 56, 0.04); + color: ${({ theme }) => theme.colors.code}; + background-color: ${({ theme }) => theme.colors.codeBg}; font-family: ${props => props.theme.code.fontFamily}; border-radius: 2px; border: 1px solid rgba(38, 50, 56, 0.1); diff --git a/src/theme.ts b/src/theme.ts index 9bdde3bb..f771f955 100644 --- a/src/theme.ts +++ b/src/theme.ts @@ -14,6 +14,8 @@ const defaultTheme: ThemeInterface = { error: '#e53935', info: '#87ceeb', text: '#263238', + code: '#e53935', + codeBg: 'rgba(38, 50, 56, 0.04)', warning: '#f1c400', http: { get: '#6bbd5b', @@ -118,6 +120,8 @@ export interface ResolvedThemeInterface { error: string; info: string; text: string; + code: string; + codeBg: string; warning: string; http: { get: string;