maisonsport-common-ui
Version:
Suite of styled-components to be consumed by the React-Native App and by the Web (via React-Native for Web)
27 lines (26 loc) • 1.09 kB
TypeScript
import React from 'react';
export declare const selectBoxID = "select-box-id";
export declare const selectBoxIconID = "select-box-icon";
export declare const selectBoxSelectedValueText = "select-box-selected-value-text";
export declare const selectBoxOptionsContainer = "select-box-options-container";
export declare const selectBoxOption = "select-box-option";
export declare const selectBoxOptionIconID = "select-box-option-icon";
export declare const selectBoxOptionTextID = "select-box-option-text";
export declare const selectBoxOptionCheckID = "select-box-option-check";
declare type Icon = string | ((props: any) => React.ReactElement);
interface OPTION {
value: string;
label: string;
Icon?: Icon;
}
interface SelectBoxProps {
placeholder: string;
value: string;
options: OPTION[];
onSelect: (selectedValue: string) => void;
Icon?: Icon;
iconPosition?: 'right' | 'left';
disabled?: boolean;
}
declare function SelectBox({ placeholder, value, options, onSelect, iconPosition, Icon, disabled }: SelectBoxProps): any;
export default SelectBox;