Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

[no ci] Add tooltips to shortcuts to create contact and task

fzaninotto87eff7482315
diff --git a/src/dashboard/HotContacts.tsx b/src/dashboard/HotContacts.tsx
index 6ad64f2c..da8c1168 100644
--- a/src/dashboard/HotContacts.tsx
+++ b/src/dashboard/HotContacts.tsx
@@ -1,5 +1,12 @@
import * as React from 'react';
-import { Card, Box, Stack, Typography, IconButton } from '@mui/material';
+import {
+ Card,
+ Box,
+ Stack,
+ Typography,
+ IconButton,
+ Tooltip,
+} from '@mui/material';
import ContactsIcon from '@mui/icons-material/Contacts';
import { useGetList, SimpleList, useGetIdentity } from 'react-admin';
@@ -33,17 +40,19 @@ export const HotContacts = () => {
<Typography variant="h5" color="textSecondary">
Hot Contacts
</Typography>
- <IconButton
- size="small"
- sx={{
- color: 'text.secondary',
- ml: 'auto',
- }}
- component={Link}
- to="/contacts/create"
- >
- <ControlPointIcon fontSize="inherit" />
- </IconButton>
+ <Tooltip title="Create contact">
+ <IconButton
+ size="small"
+ sx={{
+ color: 'text.secondary',
+ ml: 'auto',
+ }}
+ component={Link}
+ to="/contacts/create"
+ >
+ <ControlPointIcon fontSize="inherit" />
+ </IconButton>
+ </Tooltip>
</Box>
<Card
sx={{
diff --git a/src/tasks/AddTask.tsx b/src/tasks/AddTask.tsx
index 5a1d7176..c7362aa9 100644
--- a/src/tasks/AddTask.tsx
+++ b/src/tasks/AddTask.tsx
@@ -8,6 +8,7 @@ import {
DialogTitle,
IconButton,
Stack,
+ Tooltip,
} from '@mui/material';
import * as React from 'react';
import { useState } from 'react';
@@ -51,18 +52,20 @@ export const AddTask = ({
return (
<>
{display === 'icon' ? (
- <IconButton
- size="small"
- sx={{
- color: 'text.secondary',
- ml: 'auto',
- }}
- component={Link}
- to={'#'}
- onClick={handleOpen}
- >
- <ControlPointIcon fontSize="inherit" />
- </IconButton>
+ <Tooltip title="Create task">
+ <IconButton
+ size="small"
+ sx={{
+ color: 'text.secondary',
+ ml: 'auto',
+ }}
+ component={Link}
+ to={'#'}
+ onClick={handleOpen}
+ >
+ <ControlPointIcon fontSize="inherit" />
+ </IconButton>
+ </Tooltip>
) : (
<Box mt={2} mb={2}>
<Chip