0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

fix: set cn font size to 12 in sidebar section

This commit is contained in:
wangsijie 2022-04-07 12:08:25 +08:00
parent 680c570f32
commit 11899731e7
No known key found for this signature in database
GPG key ID: C72642FE24F7D42B
2 changed files with 16 additions and 2 deletions

View file

@ -6,5 +6,9 @@
padding: _.unit(2) _.unit(6);
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 12px;
font-size: 10px;
&.zh {
font-size: 12px;
}
}

View file

@ -1,4 +1,6 @@
import classNames from 'classnames';
import React, { ReactNode } from 'react';
import { useTranslation } from 'react-i18next';
import * as styles from './index.module.scss';
@ -8,9 +10,17 @@ type Props = {
};
const Section = ({ children, title }: Props) => {
const {
i18n: { language },
} = useTranslation();
const languageClassname = language.split('-')[0];
return (
<div>
<div className={styles.title}>{title}</div>
<div className={classNames(styles.title, languageClassname && styles[languageClassname])}>
{title}
</div>
{children}
</div>
);