mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
Working tooltips
This commit is contained in:
1 parent
63aea89e2b
commit
948f8dfade
1 file changed
+12
-12
@@ -1,6 +1,7 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
import { AppIcon } from './AppIcon';
|
import { AppIcon } from './AppIcon';
|
||||||
import { Grid, makeStyles } from '@material-ui/core';
|
import { Grid, makeStyles, Tooltip } from '@material-ui/core';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { useKeyboard } from '../../os/keyboard/hooks/useKeyboard';
|
import { useKeyboard } from '../../os/keyboard/hooks/useKeyboard';
|
||||||
|
|
||||||
@@ -13,12 +14,13 @@ const useStyles = makeStyles((theme) => ({
|
|||||||
width: '20%',
|
width: '20%',
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
bottom: -8,
|
bottom: -12,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const GridMenu = ({ items, Component = AppIcon }) => {
|
export const GridMenu = ({ items, Component = AppIcon }) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
const setKey = useKeyboard();
|
const setKey = useKeyboard();
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
||||||
@@ -35,15 +37,13 @@ export const GridMenu = ({ items, Component = AppIcon }) => {
|
|||||||
{items &&
|
{items &&
|
||||||
items.length &&
|
items.length &&
|
||||||
items.map((item) => (
|
items.map((item) => (
|
||||||
// <Tooltip
|
<Tooltip
|
||||||
// title={item.id}
|
key={item.id}
|
||||||
// placement='top'
|
title={t(item.nameLocale)}
|
||||||
// arrow
|
placement="top-start"
|
||||||
// classes={{ tooltip: classes.tooltip }}
|
classes={{ tooltip: classes.tooltip }}
|
||||||
// PopperProps={{
|
arrow
|
||||||
// anchorEl={}
|
>
|
||||||
// }}
|
|
||||||
// >
|
|
||||||
<Grid
|
<Grid
|
||||||
key={item.id}
|
key={item.id}
|
||||||
item
|
item
|
||||||
@@ -53,7 +53,7 @@ export const GridMenu = ({ items, Component = AppIcon }) => {
|
|||||||
>
|
>
|
||||||
<Component {...item} />
|
<Component {...item} />
|
||||||
</Grid>
|
</Grid>
|
||||||
// </Tooltip>
|
</Tooltip>
|
||||||
))}
|
))}
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in new issue
Block a user