mirror of
https://github.com/logto-io/logto.git
synced 2025-02-03 21:48:55 -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);
|
padding: _.unit(2) _.unit(6);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
|
font-size: 10px;
|
||||||
|
|
||||||
|
&.zh {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
import classNames from 'classnames';
|
||||||
import React, { ReactNode } from 'react';
|
import React, { ReactNode } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import * as styles from './index.module.scss';
|
import * as styles from './index.module.scss';
|
||||||
|
|
||||||
|
@ -8,9 +10,17 @@ type Props = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const Section = ({ children, title }: Props) => {
|
const Section = ({ children, title }: Props) => {
|
||||||
|
const {
|
||||||
|
i18n: { language },
|
||||||
|
} = useTranslation();
|
||||||
|
|
||||||
|
const languageClassname = language.split('-')[0];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className={styles.title}>{title}</div>
|
<div className={classNames(styles.title, languageClassname && styles[languageClassname])}>
|
||||||
|
{title}
|
||||||
|
</div>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue