Rename prop
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -25,7 +25,7 @@ export const searchFieldPropDefs: Record<string, PropDef> = {
|
||||
type: 'string',
|
||||
required: true,
|
||||
},
|
||||
collapsible: {
|
||||
startCollapsed: {
|
||||
type: 'boolean',
|
||||
default: 'false',
|
||||
},
|
||||
|
||||
@@ -1453,10 +1453,10 @@ export const SearchField: ForwardRefExoticComponent<
|
||||
export interface SearchFieldProps
|
||||
extends SearchFieldProps_2,
|
||||
Omit<FieldLabelProps, 'htmlFor' | 'id'> {
|
||||
collapsible?: boolean;
|
||||
icon?: ReactNode | false;
|
||||
placeholder?: string;
|
||||
size?: 'small' | 'medium' | Partial<Record<Breakpoint, 'small' | 'medium'>>;
|
||||
startCollapsed?: boolean;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
|
||||
@@ -159,7 +159,7 @@ export const CustomField: Story = {
|
||||
export const Collapsible: Story = {
|
||||
args: {
|
||||
...Default.args,
|
||||
collapsible: true,
|
||||
startCollapsed: true,
|
||||
},
|
||||
|
||||
render: args => (
|
||||
|
||||
@@ -40,7 +40,7 @@ export const SearchField = forwardRef<HTMLDivElement, SearchFieldProps>(
|
||||
description,
|
||||
isRequired,
|
||||
placeholder = 'Search',
|
||||
collapsible = false,
|
||||
startCollapsed = false,
|
||||
'aria-label': ariaLabel,
|
||||
'aria-labelledby': ariaLabelledBy,
|
||||
...rest
|
||||
@@ -100,7 +100,7 @@ export const SearchField = forwardRef<HTMLDivElement, SearchFieldProps>(
|
||||
{...dataAttributes}
|
||||
aria-label={ariaLabel}
|
||||
aria-labelledby={ariaLabelledBy}
|
||||
data-collapsible={collapsible}
|
||||
data-collapsible={startCollapsed}
|
||||
data-collapsed={isCollapsed}
|
||||
onFocusChange={handleClick}
|
||||
onChange={handleChange}
|
||||
|
||||
@@ -42,5 +42,5 @@ export interface SearchFieldProps
|
||||
/**
|
||||
* The icon to render in the input
|
||||
*/
|
||||
collapsible?: boolean;
|
||||
startCollapsed?: boolean;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ export const componentDefinitions = {
|
||||
clear: 'bui-InputClear',
|
||||
},
|
||||
dataAttributes: {
|
||||
collapsible: [true, false] as const,
|
||||
startCollapsed: [true, false] as const,
|
||||
},
|
||||
},
|
||||
Select: {
|
||||
|
||||
Reference in New Issue
Block a user