From 50d85cb93532fbcdb11769575871c24443a19662 Mon Sep 17 00:00:00 2001 From: pranitkhadilkar7 <98008346+pranitkhadilkar7@users.noreply.github.com> Date: Tue, 10 May 2022 18:19:10 +0530 Subject: [PATCH 1/3] Update styled.elements.ts fix: handled style change in ServerUrl and ServersOverlay dynamically --- src/components/Endpoint/styled.elements.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Endpoint/styled.elements.ts b/src/components/Endpoint/styled.elements.ts index e24e07c564..abf5bf7dce 100644 --- a/src/components/Endpoint/styled.elements.ts +++ b/src/components/Endpoint/styled.elements.ts @@ -59,8 +59,8 @@ export const ServersOverlay = styled.div<{ expanded: boolean }>` position: absolute; width: 100%; z-index: 100; - background: #fafafa; - color: #263238; + background: ${props => props.theme.sidebar.backgroundColor}; + color: ${props => props.theme.colors.primary.main}; box-sizing: border-box; box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.33); overflow: hidden; @@ -78,7 +78,7 @@ export const ServerItem = styled.div` export const ServerUrl = styled.div` padding: 5px; border: 1px solid #ccc; - background: #fff; + background: ${props => props.theme.sidebar.backgroundColor}; word-break: break-all; color: ${props => props.theme.colors.primary.main}; > span { From 0dc0d554f5ff4fea9bf200b2923bb35ab8c86684 Mon Sep 17 00:00:00 2001 From: PranitK Date: Tue, 31 May 2022 16:17:02 +0530 Subject: [PATCH 2/3] fix: handled style change in ServerUrl and ServersOverlay dynamically --- src/components/Endpoint/styled.elements.ts | 6 +++--- src/theme.ts | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/components/Endpoint/styled.elements.ts b/src/components/Endpoint/styled.elements.ts index abf5bf7dce..d86b6d4340 100644 --- a/src/components/Endpoint/styled.elements.ts +++ b/src/components/Endpoint/styled.elements.ts @@ -59,8 +59,8 @@ export const ServersOverlay = styled.div<{ expanded: boolean }>` position: absolute; width: 100%; z-index: 100; - background: ${props => props.theme.sidebar.backgroundColor}; - color: ${props => props.theme.colors.primary.main}; + background: ${props => props.theme.rightPanel.servers.overlay.backgroundColor}; + color: ${props => props.theme.rightPanel.servers.overlay.textColor}; box-sizing: border-box; box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.33); overflow: hidden; @@ -78,7 +78,7 @@ export const ServerItem = styled.div` export const ServerUrl = styled.div` padding: 5px; border: 1px solid #ccc; - background: ${props => props.theme.sidebar.backgroundColor}; + background: ${props => props.theme.rightPanel.servers.url.backgroundColor}; word-break: break-all; color: ${props => props.theme.colors.primary.main}; > span { diff --git a/src/theme.ts b/src/theme.ts index e8f2bf2ef6..82af0512f6 100644 --- a/src/theme.ts +++ b/src/theme.ts @@ -162,6 +162,15 @@ const defaultTheme: ThemeInterface = { backgroundColor: '#263238', width: '40%', textColor: '#ffffff', + servers: { + overlay: { + backgroundColor: '#fafafa', + textColor: '#263238', + }, + url: { + backgroundColor: '#fff', + }, + }, }, codeBlock: { backgroundColor: ({ rightPanel }) => darken(0.1, rightPanel.backgroundColor), @@ -229,6 +238,16 @@ export interface FontSettings { color: string; } +export interface Servers { + overlay: { + backgroundColor: string; + textColor: string; + }; + url: { + backgroundColor: string; + }; +} + export interface ResolvedThemeInterface { spacing: { unit: number; @@ -346,6 +365,7 @@ export interface ResolvedThemeInterface { backgroundColor: string; textColor: string; width: string; + servers: Servers; }; codeBlock: { backgroundColor: string; From 32b561939766cb5a61591271d189827c9e2a96cb Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Wed, 1 Jun 2022 14:43:12 +0300 Subject: [PATCH 3/3] chore: add new servers options to reade --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 625931ee43..6723cedc92 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,12 @@ You can use all of the following options with the standalone version of the