1909 object edit add icon section (#1995)
* wip * wip * wip * wip * wip * remove hardcoded values and use theme values * add styles to StyledContainer * fix iconPicker bug * wip * refactor IconPicker to include IconButton * close IconPicker on click outside * close IconPicker on escape and enter * refactor to use DropDownMenu * refactor to use DropDownMenu * modify default icon * Refactor to use useIconPicker hook * fix WithSearch story * reinitialized searchString state on close * create and update stories for the iconPicker * remove comments * use theme for gap * remove align-self * fix typo in icon * fix type any * fix merge conflicts * remove experimental css properties
This commit is contained in:
13
front/src/modules/ui/input/hooks/useIconPicker.ts
Normal file
13
front/src/modules/ui/input/hooks/useIconPicker.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { useRecoilState } from 'recoil';
|
||||
|
||||
import { iconPickerState } from '../states/iconPickerState';
|
||||
|
||||
export const useIconPicker = () => {
|
||||
const [iconPicker, setIconPicker] = useRecoilState(iconPickerState);
|
||||
|
||||
return {
|
||||
Icon: iconPicker.Icon,
|
||||
iconKey: iconPicker.iconKey,
|
||||
setIconPicker,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user