pl-fe: replace react-overlays with @floating-ui/react

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-09-27 20:35:59 +02:00
parent 62895adb02
commit bc3f02aee6
9 changed files with 105 additions and 289 deletions

View File

@ -1,6 +1,6 @@
import React from 'react';
import ColorWithPicker from 'pl-fe/features/pl-fe-config/components/color-with-picker';
import ColorPicker from 'pl-fe/features/pl-fe-config/components/color-picker';
import type { ColorChangeHandler } from 'react-color';
@ -17,7 +17,7 @@ const Color: React.FC<IColor> = ({ color, onChange }) => {
};
return (
<ColorWithPicker
<ColorPicker
className='size-full'
value={color}
onChange={handleChange}

View File

@ -8,7 +8,7 @@ import { fetchPlFeConfig } from 'pl-fe/actions/pl-fe';
import DropdownMenu from 'pl-fe/components/dropdown-menu';
import List, { ListItem } from 'pl-fe/components/list';
import { Button, Column, Form, FormActions } from 'pl-fe/components/ui';
import ColorWithPicker from 'pl-fe/features/pl-fe-config/components/color-with-picker';
import ColorPicker from 'pl-fe/features/pl-fe-config/components/color-picker';
import { useAppDispatch, useAppSelector, usePlFeConfig } from 'pl-fe/hooks';
import { normalizePlFeConfig } from 'pl-fe/normalizers';
import toast from 'pl-fe/toast';
@ -265,7 +265,7 @@ const ColorListItem: React.FC<IColorListItem> = ({ label, value, onChange }) =>
return (
<ListItem label={label}>
<ColorWithPicker
<ColorPicker
value={value}
onChange={handleChange}
className='h-8 w-10 overflow-hidden rounded-md'