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:
bosiraphael
2023-10-13 15:29:30 +02:00
committed by GitHub
parent 818efd72d0
commit 30aeea9eec
9 changed files with 287 additions and 41 deletions

View 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,
};
};