New view picker (#4610)
* Implement new view picker * Complete feature * Fixes according to review
This commit is contained in:
@ -30,6 +30,7 @@ type IconPickerProps = {
|
||||
onOpen?: () => void;
|
||||
variant?: IconButtonVariant;
|
||||
className?: string;
|
||||
disableBlur?: boolean;
|
||||
};
|
||||
|
||||
const StyledMenuIconItemsContainer = styled.div`
|
||||
@ -86,6 +87,7 @@ export const IconPicker = ({
|
||||
onClose,
|
||||
onOpen,
|
||||
variant = 'secondary',
|
||||
disableBlur = false,
|
||||
className,
|
||||
}: IconPickerProps) => {
|
||||
const [searchString, setSearchString] = useState('');
|
||||
@ -148,6 +150,7 @@ export const IconPicker = ({
|
||||
/>
|
||||
}
|
||||
dropdownMenuWidth={176}
|
||||
disableBlur={disableBlur}
|
||||
dropdownComponents={
|
||||
<SelectableList
|
||||
selectableListId="icon-list"
|
||||
|
||||
@ -22,6 +22,7 @@ export type SelectOption<Value extends string | number | null> = {
|
||||
export type SelectProps<Value extends string | number | null> = {
|
||||
className?: string;
|
||||
disabled?: boolean;
|
||||
disableBlur?: boolean;
|
||||
dropdownId: string;
|
||||
dropdownWidth?: `${string}px` | 'auto' | number;
|
||||
emptyOption?: SelectOption<Value>;
|
||||
@ -75,6 +76,7 @@ const StyledIconChevronDown = styled(IconChevronDown)<{ disabled?: boolean }>`
|
||||
export const Select = <Value extends string | number | null>({
|
||||
className,
|
||||
disabled: disabledFromProps,
|
||||
disableBlur = false,
|
||||
dropdownId,
|
||||
dropdownWidth = 176,
|
||||
emptyOption,
|
||||
@ -141,6 +143,7 @@ export const Select = <Value extends string | number | null>({
|
||||
dropdownMenuWidth={dropdownWidth}
|
||||
dropdownPlacement="bottom-start"
|
||||
clickableComponent={selectControl}
|
||||
disableBlur={disableBlur}
|
||||
dropdownComponents={
|
||||
<>
|
||||
{!!withSearchInput && (
|
||||
|
||||
Reference in New Issue
Block a user