-
-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Login form tweaks - Improve consistency - Add tooltips * Cleanup ServerInfo list * Slight layout tweaks
- Loading branch information
1 parent
855afde
commit bef6270
Showing
5 changed files
with
152 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
import { ActionIcon, Group, useMantineColorScheme } from '@mantine/core'; | ||
import { | ||
ActionIcon, | ||
Group, | ||
Tooltip, | ||
useMantineColorScheme | ||
} from '@mantine/core'; | ||
import { IconMoonStars, IconSun } from '@tabler/icons-react'; | ||
|
||
import { t } from '@lingui/macro'; | ||
import { vars } from '../../theme'; | ||
|
||
export function ColorToggle() { | ||
const { colorScheme, toggleColorScheme } = useMantineColorScheme(); | ||
|
||
return ( | ||
<Group justify='center'> | ||
<ActionIcon | ||
onClick={toggleColorScheme} | ||
size='lg' | ||
style={{ | ||
color: | ||
colorScheme === 'dark' ? vars.colors.yellow[4] : vars.colors.blue[6] | ||
}} | ||
variant='transparent' | ||
> | ||
{colorScheme === 'dark' ? <IconSun /> : <IconMoonStars />} | ||
</ActionIcon> | ||
<Tooltip label={t`Toggle color scheme`}> | ||
<ActionIcon | ||
onClick={toggleColorScheme} | ||
size='lg' | ||
style={{ | ||
color: | ||
colorScheme === 'dark' | ||
? vars.colors.yellow[4] | ||
: vars.colors.blue[6] | ||
}} | ||
variant='transparent' | ||
> | ||
{colorScheme === 'dark' ? <IconSun /> : <IconMoonStars />} | ||
</ActionIcon> | ||
</Tooltip> | ||
</Group> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters