Introduce ComponentState (#4386)
* Proof of concept ComponentState * Migrate to createState and createFamilyState * Refactor * Fix * Fix tests * Fix lint * Fix tests * Re-enable coverage
This commit is contained in:
@ -1,14 +1,13 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
import { IconApps } from '@/ui/display/icon';
|
||||
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
||||
import { createState } from '@/ui/utilities/state/utils/createState';
|
||||
|
||||
type IconPickerState = {
|
||||
Icon: IconComponent;
|
||||
iconKey: string;
|
||||
};
|
||||
|
||||
export const iconPickerState = atom<IconPickerState>({
|
||||
export const iconPickerState = createState<IconPickerState>({
|
||||
key: 'iconPickerState',
|
||||
default: { Icon: IconApps, iconKey: 'IconApps' },
|
||||
defaultValue: { Icon: IconApps, iconKey: 'IconApps' },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user