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 {
color: ${props => props.theme.colors.responses.success.color};
color: ${props => props.theme.colors.responses.success.tabTextColor};
}
&.tab-redirect {
color: ${props => props.theme.colors.responses.redirect.color};
color: ${props => props.theme.colors.responses.redirect.tabTextColor};
}
&.tab-info {
color: ${props => props.theme.colors.responses.info.color};
color: ${props => props.theme.colors.responses.info.tabTextColor};
}
&.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: {
color: ({ colors }) => colors.success.main,
backgroundColor: ({ colors }) => transparentize(0.93, colors.success.main),
tabTextColor: ({ colors }) => colors.responses.success.color,
},
error: {
color: ({ colors }) => colors.error.main,
backgroundColor: ({ colors }) => transparentize(0.93, colors.error.main),
tabTextColor: ({ colors }) => colors.responses.error.color,
},
redirect: {
color: ({ colors }) => colors.warning.main,
backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.redirect.color),
tabTextColor: ({ colors }) => colors.responses.redirect.color,
},
info: {
color: '#87ceeb',
backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.info.color),
tabTextColor: ({ colors }) => colors.responses.info.color,
},
},
http: {
@ -206,6 +210,7 @@ export interface ColorSetting {
export interface HTTPResponseColos {
color: string;
backgroundColor: string;
tabTextColor: string;
}
export interface FontSettings {