feat(web/input): description tooltip on fields

This commit is contained in:
Luke
2022-10-27 13:45:27 +02:00
parent 1127108fcd
commit a6a0e4905f
10 changed files with 68 additions and 9 deletions

View File

@@ -1,7 +1,8 @@
import { Box, InputGroup, InputLeftElement, InputRightElement, Text, Input } from '@chakra-ui/react';
import { Box, InputGroup, InputLeftElement, InputRightElement, Input } from '@chakra-ui/react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { useEffect } from 'react';
import { IInput } from '../../../interfaces/dialog';
import Label from './Label';
interface Props {
row: IInput;
@@ -19,7 +20,7 @@ const InputField: React.FC<Props> = (props) => {
return (
<>
<Box mb={3} textAlign="left">
<Text>{props.row.label}</Text>
<Label label={props.row.label} description={props.row.description} />
<InputGroup>
{props.row.icon && (
<InputLeftElement pointerEvents="none" children={<FontAwesomeIcon icon={props.row.icon} fixedWidth />} />