Skip to content

Commit

Permalink
Hide tooltips on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Sep 24, 2024
1 parent a598aef commit 498de06
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/AlertsActionIcon/AlertsActionIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function AlertsActionIcon() {

return (
<>
<Tooltip label={label} position="bottom">
<Tooltip label={label} position="bottom" visibleFrom="sm">
<ActionIcon
size="lg"
variant="transparent"
Expand Down
17 changes: 10 additions & 7 deletions src/components/AuthenticatedIcon/AuthenticatedIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
* @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
*/

import authenticateAPI, {
forgetAuth,
testAuthentication,
} from '@/src/actions/authenticate-api';
import React, { FormEvent } from 'react';
import { IconLock, IconLockOpen } from '@tabler/icons-react';
import {
ActionIcon,
Box,
Expand All @@ -20,8 +18,10 @@ import {
Tooltip,
} from '@mantine/core';
import { useDisclosure } from '@mantine/hooks';
import { IconLock, IconLockOpen } from '@tabler/icons-react';
import React, { FormEvent } from 'react';
import authenticateAPI, {
forgetAuth,
testAuthentication,
} from '@/src/actions/authenticate-api';
import { AuthContext } from '../LVMWebRoot/LVMWebRoot';

type AuthoriseModalProps = {
Expand Down Expand Up @@ -126,7 +126,10 @@ export default function AuthenticatedIcon() {

return (
<Box>
<Tooltip label={authStatus.logged ? 'Authenticated' : 'Click to authenticate'}>
<Tooltip
label={authStatus.logged ? 'Authenticated' : 'Click to authenticate'}
visibleFrom="sm"
>
<ActionIcon
variant="transparent"
size="lg"
Expand Down
2 changes: 1 addition & 1 deletion src/components/ShutdownActionIcon/ShutdownActionIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function ShutdownActionIcon() {

return (
<>
<Tooltip label={label} position="bottom">
<Tooltip label={label} position="bottom" visibleFrom="sm">
<Group
gap={0}
onClick={open}
Expand Down

0 comments on commit 498de06

Please sign in to comment.