feat: add tabTextColor option for responses (#1451)

This commit is contained in:
Anna Stasiuk 2020-11-05 15:23:05 +02:00 committed by GitHub
parent 6bedcf94b2
commit 702fea0f41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -44,19 +44,19 @@ export const Tabs = styled(ReactTabs)`
} }
&.tab-success { &.tab-success {
color: ${props => props.theme.colors.responses.success.color}; color: ${props => props.theme.colors.responses.success.tabTextColor};
} }
&.tab-redirect { &.tab-redirect {
color: ${props => props.theme.colors.responses.redirect.color}; color: ${props => props.theme.colors.responses.redirect.tabTextColor};
} }
&.tab-info { &.tab-info {
color: ${props => props.theme.colors.responses.info.color}; color: ${props => props.theme.colors.responses.info.tabTextColor};
} }
&.tab-error { &.tab-error {
color: ${props => props.theme.colors.responses.error.color}; color: ${props => props.theme.colors.responses.error.tabTextColor};
} }
} }
} }

View File

@ -53,18 +53,22 @@ const defaultTheme: ThemeInterface = {
success: { success: {
color: ({ colors }) => colors.success.main, color: ({ colors }) => colors.success.main,
backgroundColor: ({ colors }) => transparentize(0.93, colors.success.main), backgroundColor: ({ colors }) => transparentize(0.93, colors.success.main),
tabTextColor: ({ colors }) => colors.responses.success.color,
}, },
error: { error: {
color: ({ colors }) => colors.error.main, color: ({ colors }) => colors.error.main,
backgroundColor: ({ colors }) => transparentize(0.93, colors.error.main), backgroundColor: ({ colors }) => transparentize(0.93, colors.error.main),
tabTextColor: ({ colors }) => colors.responses.error.color,
}, },
redirect: { redirect: {
color: ({ colors }) => colors.warning.main, color: ({ colors }) => colors.warning.main,
backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.redirect.color), backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.redirect.color),
tabTextColor: ({ colors }) => colors.responses.redirect.color,
}, },
info: { info: {
color: '#87ceeb', color: '#87ceeb',
backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.info.color), backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.info.color),
tabTextColor: ({ colors }) => colors.responses.info.color,
}, },
}, },
http: { http: {
@ -206,6 +210,7 @@ export interface ColorSetting {
export interface HTTPResponseColos { export interface HTTPResponseColos {
color: string; color: string;
backgroundColor: string; backgroundColor: string;
tabTextColor: string;
} }
export interface FontSettings { export interface FontSettings {