Skip to content

Commit

Permalink
fix(style): tooltip & font size in navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed May 9, 2024
1 parent 4f0a15a commit 7d2b2bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/GZCTF/ClientApp/src/components/AppHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const AppHeader: FC = () => {

<Menu.Dropdown>
{supportedLanguages.map((lang: SupportedLanguages) => (
<Menu.Item key={lang} fw={500} fz="md" onClick={() => setLanguage(lang)}>
<Menu.Item key={lang} fw={500} onClick={() => setLanguage(lang)}>
{LanguageMap[lang] ?? lang}
</Menu.Item>
))}
Expand Down Expand Up @@ -140,6 +140,7 @@ const AppHeader: FC = () => {
<Icon path={mdiWeatherNight} size={1} />
)
}
fw={500}
onClick={() => toggleColorScheme()}
>
{t('common.tab.theme.switch_to', {
Expand Down
15 changes: 6 additions & 9 deletions src/GZCTF/ClientApp/src/components/AppNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ const useStyles = createStyles((theme, _, u) => {
},
},

tooltipBody: {
tooltip: {
marginLeft: 20,
fontWeight: 500,

[u.dark]: {
backgroundColor: darken(theme.colors[theme.primaryColor][8], 0.45),
Expand Down Expand Up @@ -106,7 +107,7 @@ const NavbarLink: FC<NavbarLinkProps> = (props: NavbarLinkProps) => {
const { t } = useTranslation()

return (
<Tooltip label={t(props.label)} classNames={{ tooltip: classes.tooltipBody }} position="right">
<Tooltip label={t(props.label)} classNames={classes} position="right">
<ActionIcon
onClick={props.onClick}
component={Link}
Expand Down Expand Up @@ -205,7 +206,7 @@ const AppNavbar: FC = () => {

<Menu.Dropdown>
{supportedLanguages.map((lang: SupportedLanguages) => (
<Menu.Item key={lang} fw={500} fz="md" onClick={() => setLanguage(lang)}>
<Menu.Item key={lang} fw={500} onClick={() => setLanguage(lang)}>
{LanguageMap[lang] ?? lang}
</Menu.Item>
))}
Expand All @@ -218,7 +219,7 @@ const AppNavbar: FC = () => {
theme:
colorScheme === 'dark' ? t('common.tab.theme.light') : t('common.tab.theme.dark'),
})}
classNames={{ tooltip: classes.tooltipBody }}
classNames={classes}
position="right"
>
<ActionIcon onClick={() => toggleColorScheme()} className={classes.link}>
Expand Down Expand Up @@ -270,11 +271,7 @@ const AppNavbar: FC = () => {
</Menu.Dropdown>
</Menu>
) : (
<Tooltip
label={t('common.tab.account.login')}
classNames={{ tooltip: classes.tooltipBody }}
position="right"
>
<Tooltip label={t('common.tab.account.login')} classNames={classes} position="right">
<ActionIcon
component={Link}
to={`/account/login?from=${location.pathname}`}
Expand Down

0 comments on commit 7d2b2bd

Please sign in to comment.