Skip to content

Commit

Permalink
feat: add tabTextColor option for responses
Browse files Browse the repository at this point in the history
  • Loading branch information
stasiukanya committed Nov 5, 2020
1 parent 4729fc3 commit 753b191
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/common-elements/tabs.ts
Expand Up @@ -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};
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/theme.ts
Expand Up @@ -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: {
Expand Down Expand Up @@ -206,6 +210,7 @@ export interface ColorSetting {
export interface HTTPResponseColos {
color: string;
backgroundColor: string;
tabTextColor: string;
}

export interface FontSettings {
Expand Down

0 comments on commit 753b191

Please sign in to comment.