mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 03:16:48 +03:00
feat: add tabTextColor option for responses (#1451)
This commit is contained in:
parent
6bedcf94b2
commit
702fea0f41
|
@ -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};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user