File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { IconButton } from '../../base/IconButton' ;
3+ import { useTheme } from '../../theme' ;
4+ import { CustomTooltip } from '../CustomTooltip' ;
5+ import { IconWrapper } from '../ResponsiveDataTable' ;
6+
7+ interface TooltipIconProps {
8+ title : string ;
9+ onClick ?: ( event : React . MouseEvent < HTMLElement > ) => void ;
10+ icon ?: React . ReactNode ;
11+ arrow ?: boolean ;
12+ style ?: React . CSSProperties ;
13+ iconType ?: string ;
14+ id ?: string ;
15+ placement ?: 'bottom' | 'top' | 'left' | 'right' ;
16+ disabled ?: boolean ;
17+ children ?: React . ReactNode ;
18+ }
19+
20+ export function TooltipIcon ( {
21+ children,
22+ title,
23+ onClick,
24+ icon,
25+ style,
26+ arrow = true ,
27+ disabled = false ,
28+ iconType,
29+ id,
30+ placement
31+ } : TooltipIconProps ) : JSX . Element {
32+ const theme = useTheme ( ) ;
33+
34+ return (
35+ < CustomTooltip title = { title } arrow = { arrow } placement = { placement } id = { id } >
36+ < IconWrapper disabled = { disabled } >
37+ < IconButton
38+ disabled = { disabled }
39+ onClick = { onClick }
40+ sx = { {
41+ '&:hover' : {
42+ '& svg' : {
43+ fill :
44+ iconType === 'delete'
45+ ? theme . palette . error . main
46+ : theme . palette . primary . brand ?. default
47+ }
48+ } ,
49+ ...style
50+ } }
51+ disableRipple
52+ >
53+ { icon || children }
54+ </ IconButton >
55+ </ IconWrapper >
56+ </ CustomTooltip >
57+ ) ;
58+ }
59+
60+ export default TooltipIcon ;
Original file line number Diff line number Diff line change 1+ import TooltipIcon from './TooltipIconButton' ;
2+
3+ export { TooltipIcon } ;
Original file line number Diff line number Diff line change @@ -62,6 +62,23 @@ const UserSearchField: React.FC<UserSearchFieldProps> = ({
6262 usersSearch,
6363 setUsersSearch
6464} ) => {
65+ console . log ( 'amit usersearchfield' , {
66+ usersData,
67+ setUsersData,
68+ label,
69+ setDisableSave,
70+ handleNotifyPref,
71+ notifyUpdate,
72+ isCreate,
73+ searchType,
74+ disabled,
75+ currentUserData,
76+ searchedUsers,
77+ isUserSearchLoading,
78+ fetchSearchedUsers,
79+ usersSearch,
80+ setUsersSearch
81+ } ) ;
6582 const [ error , setError ] = useState ( '' ) ;
6683 const [ open , setOpen ] = useState ( false ) ;
6784 const [ showAllUsers , setShowAllUsers ] = useState ( false ) ;
You can’t perform that action at this time.
0 commit comments