wix-style-react
Version:
wix-style-react
41 lines • 1.83 kB
TypeScript
import * as React from 'react';
type AddressInputItemLayout = 'single-line' | 'double-line';
export interface AddressInputItemProps {
/** Applies a data-hook HTML attribute that can be used in the tests */
dataHook?: string;
/** Specifies a CSS class name to be appended to the component’s root element */
className?: string;
/** Sets the main label of an option. This label is a primary part that is matched to a search term or keyword. */
mainLabel?: string;
/** Sets the additional information of an address. Usually contains a region or a country. */
secondaryLabel?: string;
/** Sets the layout of mainLabel and secondaryLabel. Labels can be either side by side or stacked vertically. */
optionLayout?: AddressInputItemLayout;
/** Pass a component you want to show as the prefix of the input, e.g., text, icon. */
prefix?: React.ReactNode;
/** Pass a component you want to show as the suffix of the input, e.g., text, icon, button. */
suffix?: React.ReactNode;
/** Specifies whether the option is selected. */
selected?: boolean;
/** Specifies whether option is highlighted */
highlighted?: boolean;
/** Specifies whether option is disabled */
disabled?: boolean;
/** Defines a callback function which is called every time option is clicked */
onClick?: React.MouseEventHandler<HTMLElement>;
}
export interface AddressInputItemBuilderProps {
id: string | number;
className?: string;
prefix?: React.ReactNode;
mainLabel?: string;
secondaryLabel?: string;
suffix?: React.ReactNode;
disabled?: boolean;
dataHook?: string;
optionLayout?: AddressInputItemLayout;
displayLabel?: string;
onClick?: React.MouseEventHandler<HTMLElement>;
}
export {};
//# sourceMappingURL=AddressInputItem.types.d.ts.map