feat: theme add links underline options

This commit is contained in:
Loïc Fürhoff 2021-04-30 11:03:54 +02:00
parent 4b072be8d1
commit 2e626d114a
2 changed files with 13 additions and 4 deletions

View File

@ -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};
}
}
`;

View File

@ -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: {