mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 05:40:19 +03:00
feat: theme add links underline options
This commit is contained in:
parent
4b072be8d1
commit
2e626d114a
|
@ -6,7 +6,7 @@ import { StyledComponent } from 'styled-components';
|
|||
|
||||
export const linksCss = css`
|
||||
a {
|
||||
text-decoration: none;
|
||||
text-decoration: ${props => props.theme.typography.links.textDecoration};
|
||||
color: ${props => props.theme.typography.links.color};
|
||||
|
||||
&:visited {
|
||||
|
@ -14,7 +14,8 @@ export const linksCss = css`
|
|||
}
|
||||
|
||||
&:hover {
|
||||
color: ${props => props.theme.typography.links.hover};
|
||||
color: ${props => props.theme.typography.links.hover.color};
|
||||
text-decoration: ${props => props.theme.typography.links.hover.textDecoration};
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
|
12
src/theme.ts
12
src/theme.ts
|
@ -127,7 +127,11 @@ const defaultTheme: ThemeInterface = {
|
|||
links: {
|
||||
color: ({ colors }) => colors.primary.main,
|
||||
visited: ({ typography }) => typography.links.color,
|
||||
hover: ({ typography }) => lighten(0.2, typography.links.color),
|
||||
hover: {
|
||||
color: ({ typography }) => lighten(0.2, typography.links.color),
|
||||
textDecoration: ({ typography }) => typography.links.textDecoration,
|
||||
},
|
||||
textDecoration: 'none'
|
||||
},
|
||||
},
|
||||
sidebar: {
|
||||
|
@ -306,7 +310,11 @@ export interface ResolvedThemeInterface {
|
|||
links: {
|
||||
color: string;
|
||||
visited: string;
|
||||
hover: string;
|
||||
hover: {
|
||||
color: string;
|
||||
textDecoration: string;
|
||||
};
|
||||
textDecoration: string;
|
||||
};
|
||||
};
|
||||
sidebar: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user