@croquiscom/pds 3.3.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -26,6 +26,8 @@ export interface DropdownProps<OptionValue> {
|
|
|
26
26
|
/** @default large */
|
|
27
27
|
size?: InputSize;
|
|
28
28
|
disabled?: boolean;
|
|
29
|
+
/** @default true */
|
|
30
|
+
optionsMatchRefWidth?: boolean;
|
|
29
31
|
options: Array<DropdownOption<OptionValue>>;
|
|
30
32
|
placeholder?: string;
|
|
31
33
|
status?: DropdownLabelProps['status'];
|
|
@@ -38,5 +40,6 @@ export interface DropdownProps<OptionValue> {
|
|
|
38
40
|
autoPlacement?: boolean;
|
|
39
41
|
keyExtractor?: (item: DropdownOption<OptionValue>, index: number) => string | number;
|
|
40
42
|
onChange?: (value: OptionValue) => void;
|
|
43
|
+
renderLabel?: (selectedOption: DropdownOption<OptionValue>) => ReactNode;
|
|
41
44
|
}
|
|
42
|
-
export declare const Dropdown: <OptionValue extends string | number>({ className, width, maxHeight, zIndex, size: sizeProp, disabled, options, placeholder, status, value: valueProp, autoPlacement: autoPlacementProps, keyExtractor, onChange, }: DropdownProps<OptionValue>) => JSX.Element;
|
|
45
|
+
export declare const Dropdown: <OptionValue extends string | number>({ className, width, maxHeight, zIndex, size: sizeProp, disabled, optionsMatchRefWidth, options, placeholder, status, value: valueProp, autoPlacement: autoPlacementProps, keyExtractor, onChange, renderLabel, }: DropdownProps<OptionValue>) => JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
3
|
import { Dropdown } from './Dropdown';
|
|
4
|
-
declare const _default: ComponentMeta<(<OptionValue extends string | number>({ className, width, maxHeight, zIndex, size: sizeProp, disabled, options, placeholder, status, value: valueProp, autoPlacement: autoPlacementProps, keyExtractor, onChange, }: import("./Dropdown").DropdownProps<OptionValue>) => JSX.Element)>;
|
|
4
|
+
declare const _default: ComponentMeta<(<OptionValue extends string | number>({ className, width, maxHeight, zIndex, size: sizeProp, disabled, optionsMatchRefWidth, options, placeholder, status, value: valueProp, autoPlacement: autoPlacementProps, keyExtractor, onChange, renderLabel, }: import("./Dropdown").DropdownProps<OptionValue>) => JSX.Element)>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Base: any;
|
|
7
7
|
export declare const Error: any;
|
|
@@ -12,3 +12,4 @@ export declare const DisabledOptionItem: any;
|
|
|
12
12
|
export declare const CustomMaxHeight: any;
|
|
13
13
|
export declare const WithIcon: ComponentStory<typeof Dropdown>;
|
|
14
14
|
export declare const Controlled: ComponentStory<typeof Dropdown>;
|
|
15
|
+
export declare const CustomLabel: ComponentStory<typeof Dropdown>;
|