mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-09 22:54:51 +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`
|
export const linksCss = css`
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: ${props => props.theme.typography.links.textDecoration};
|
||||||
color: ${props => props.theme.typography.links.color};
|
color: ${props => props.theme.typography.links.color};
|
||||||
|
|
||||||
&:visited {
|
&:visited {
|
||||||
|
@ -14,7 +14,8 @@ export const linksCss = css`
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&: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: {
|
links: {
|
||||||
color: ({ colors }) => colors.primary.main,
|
color: ({ colors }) => colors.primary.main,
|
||||||
visited: ({ typography }) => typography.links.color,
|
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: {
|
sidebar: {
|
||||||
|
@ -306,7 +310,11 @@ export interface ResolvedThemeInterface {
|
||||||
links: {
|
links: {
|
||||||
color: string;
|
color: string;
|
||||||
visited: string;
|
visited: string;
|
||||||
hover: string;
|
hover: {
|
||||||
|
color: string;
|
||||||
|
textDecoration: string;
|
||||||
|
};
|
||||||
|
textDecoration: string;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sidebar: {
|
sidebar: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user