@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
56 lines (55 loc) • 2.81 kB
TypeScript
import React, { ReactNode } from 'react';
/** An Option Custom HTML Element.
Implements https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option .
* For more info on this Vivid element please visit https://vivid.deno.dev/components/option
* @param {boolean | undefined} checked - The checked state is used when the parent listbox is in multiple selection mode.
To avoid accessibility conflicts, the checked state should not be present in
single selection mode.
* @param {boolean} defaultSelected - The defaultSelected state of the option. **attribute** `selected`
* @param {boolean} disabled - The disabled state of the option. **attribute** `disabled`
* @param selectedAttribute
* @param {boolean} selected - The checked state of the control. **attribute** `current-selected`
* @param {string} value - The value of the option. **attribute** `value`
* @param {string | undefined} _label **attribute** `label`
* @param {string} label
* @param {string | undefined} _text **attribute** `text`
* @param text
* @param {string | undefined} matchedText - Text to highlighted as matching a search query. **attribute** `matched-text`
* @param {OptionTagConnotation | undefined} tagConnotation - When displayed as a tag, the connotation of the tag. **attribute** `tag-connotation`
* @param proxy
* @param {'host'} _vividAriaBehaviour
* @param {boolean} iconTrailing - Indicates the icon affix alignment. **attribute** `icon-trailing`
* @param {string | undefined} icon - A decorative icon the custom element should have. **attribute** `icon`
* @param {string} VIVID_VERSION - The current version of the Vivid library, which is useful for debugging.
It can be accessed from any Vivid element via `<el>.constructor.VIVID_VERSION`.
* @param {string} componentName - Core component name, without prefix
*/
declare const VwcOption: {
(props: {
children?: ReactNode;
slot?: string | undefined;
id?: string | undefined;
style?: React.CSSProperties | undefined;
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
checked?: any;
defaultSelected?: boolean | undefined;
disabled?: boolean | undefined;
selectedAttribute?: any;
selected?: boolean | undefined;
value?: string | undefined;
_label?: string | undefined;
label?: string | undefined;
_text?: string | undefined;
text?: any;
matchedText?: string | undefined;
tagConnotation?: any;
proxy?: any;
_vividAriaBehaviour?: any;
iconTrailing?: boolean | undefined;
icon?: string | undefined;
VIVID_VERSION?: string | undefined;
componentName?: string | undefined;
}): JSX.Element;
displayName: string;
};
export default VwcOption;