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:
parent
680c570f32
commit
11899731e7
2 changed files with 16 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue