Skip to content

Commit

Permalink
feat: add tooltip explaining preview mode
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 committed Dec 11, 2023
1 parent dd3fc6d commit 964a73c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions apps/antalmanac/src/components/Header/SettingsMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useCallback, useState } from 'react';
import { Box, Button, ButtonGroup, Drawer, IconButton, Switch, Typography, useMediaQuery } from '@material-ui/core';
import { Divider, Stack } from '@mui/material';
import { Divider, Stack, Tooltip } from '@mui/material';
import { CSSProperties } from '@material-ui/core/styles/withStyles';
import { Close, DarkMode, LightMode, Settings, SettingsBrightness } from '@mui/icons-material';
import { Close, DarkMode, Help, LightMode, Settings, SettingsBrightness } from '@mui/icons-material';

import { usePreviewStore, useThemeStore, useTimeFormatStore } from '$stores/SettingsStore';

Expand Down Expand Up @@ -146,9 +146,14 @@ function ExperimentalMenu() {
return (
<Stack sx={{ padding: '1rem 1rem 0 1rem', width: '100%', display: 'flex' }} alignItems="middle">
<Box display="flex" justifyContent="space-between" width={1}>
<Typography variant="h6" style={{ display: 'flex', alignItems: 'center', alignContent: 'center' }}>
Preview Mode
</Typography>
<Box display="flex" alignItems="center" style={{ gap: 4 }}>
<Typography variant="h6" style={{ display: 'flex', alignItems: 'center', alignContent: 'center' }}>
Preview Mode
</Typography>
<Tooltip title={<Typography>Hover over courses to preview them in your calendar!</Typography>}>
<Help />
</Tooltip>
</Box>
<Switch color="primary" value={previewMode} checked={previewMode} onChange={handlePreviewChange} />
</Box>
</Stack>
Expand Down

0 comments on commit 964a73c

Please sign in to comment.