mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 11:26:37 +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`
|
||||
font-family: ${props => props.theme.typography.headings.fontFamily};
|
||||
font-family: ${({ theme }) => theme.typography.headings.fontFamily};
|
||||
font-weight: ${({ theme }) => theme.typography.headings.fontWeight};
|
||||
font-size: ${headerFontSize[level]};
|
||||
line-height: ${({ theme }) => theme.typography.headings.lineHeight};
|
||||
`;
|
||||
|
||||
export const H1 = styled.h1`
|
||||
${headerCommonMixin(1)};
|
||||
color: ${props => props.theme.colors.primary.main};
|
||||
color: ${({ theme }) => theme.colors.primary.main};
|
||||
|
||||
${extensionsHook('H1')};
|
||||
`;
|
||||
|
|
|
@ -105,6 +105,7 @@ const defaultTheme: ThemeInterface = {
|
|||
headings: {
|
||||
fontFamily: 'Montserrat, sans-serif',
|
||||
fontWeight: '400',
|
||||
lineHeight: '1.6em',
|
||||
},
|
||||
code: {
|
||||
fontSize: '13px',
|
||||
|
@ -282,6 +283,7 @@ export interface ResolvedThemeInterface {
|
|||
headings: {
|
||||
fontFamily: string;
|
||||
fontWeight: string;
|
||||
lineHeight: string;
|
||||
};
|
||||
|
||||
links: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user