UNPKG

@shopify/polaris

Version:

Shopify’s admin product component library

24 lines (23 loc) 1.02 kB
/// <reference types="react" /> import type { OptionDescriptor, SectionDescriptor } from '../../types'; export interface OptionListProps { /** A unique identifier for the option list */ id?: string; /** List title */ title?: string; /** Collection of options to be listed */ options?: OptionDescriptor[]; /** Defines a specific role attribute for the list itself */ role?: 'listbox' | 'combobox' | string; /** Defines a specific role attribute for each option in the list */ optionRole?: string; /** Sections containing a header and related options */ sections?: SectionDescriptor[]; /** The selected options */ selected: string[]; /** Allow more than one option to be selected */ allowMultiple?: boolean; /** Callback when selection is changed */ onChange(selected: string[]): void; } export declare function OptionList({ options, sections, title, selected, allowMultiple, role, optionRole, onChange, id: idProp, }: OptionListProps): JSX.Element;