mirror of
https://github.com/Redocly/redoc.git
synced 2025-02-07 13:30:33 +03:00
feat: add lineHeight config for headings (#894)
This commit is contained in:
parent
82c0cb1a3c
commit
5dd5d6d704
|
@ -7,14 +7,15 @@ const headerFontSize = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const headerCommonMixin = level => css`
|
export const headerCommonMixin = level => css`
|
||||||
font-family: ${props => props.theme.typography.headings.fontFamily};
|
font-family: ${({ theme }) => theme.typography.headings.fontFamily};
|
||||||
font-weight: ${({ theme }) => theme.typography.headings.fontWeight};
|
font-weight: ${({ theme }) => theme.typography.headings.fontWeight};
|
||||||
font-size: ${headerFontSize[level]};
|
font-size: ${headerFontSize[level]};
|
||||||
|
line-height: ${({ theme }) => theme.typography.headings.lineHeight};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const H1 = styled.h1`
|
export const H1 = styled.h1`
|
||||||
${headerCommonMixin(1)};
|
${headerCommonMixin(1)};
|
||||||
color: ${props => props.theme.colors.primary.main};
|
color: ${({ theme }) => theme.colors.primary.main};
|
||||||
|
|
||||||
${extensionsHook('H1')};
|
${extensionsHook('H1')};
|
||||||
`;
|
`;
|
||||||
|
|
|
@ -105,6 +105,7 @@ const defaultTheme: ThemeInterface = {
|
||||||
headings: {
|
headings: {
|
||||||
fontFamily: 'Montserrat, sans-serif',
|
fontFamily: 'Montserrat, sans-serif',
|
||||||
fontWeight: '400',
|
fontWeight: '400',
|
||||||
|
lineHeight: '1.6em',
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
fontSize: '13px',
|
fontSize: '13px',
|
||||||
|
@ -282,6 +283,7 @@ export interface ResolvedThemeInterface {
|
||||||
headings: {
|
headings: {
|
||||||
fontFamily: string;
|
fontFamily: string;
|
||||||
fontWeight: string;
|
fontWeight: string;
|
||||||
|
lineHeight: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
links: {
|
links: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user