-
Notifications
You must be signed in to change notification settings - Fork 29.9k
/
DecoratedOptionWidget.d.ts
58 lines (52 loc) · 2.37 KB
/
DecoratedOptionWidget.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
declare namespace OO.ui {
/**
* DecoratedOptionWidgets are {@link OO.ui.OptionWidget options} that can be configured
* with an {@link OO.ui.mixin.IconElement icon} and/or
* {@link OO.ui.mixin.IndicatorElement indicator}.
* This class is used with OO.ui.SelectWidget to create a selection of mutually exclusive
* options. For more information about options and selects, please see the
* [OOUI documentation on MediaWiki](https://www.mediawiki.org/wiki/OOUI/Widgets/Selects_and_Options).
*
* // Decorated options in a select widget.
* var select = new OO.ui.SelectWidget( {
* items: [
* new OO.ui.DecoratedOptionWidget( {
* data: 'a',
* label: 'Option with icon',
* icon: 'help'
* } ),
* new OO.ui.DecoratedOptionWidget( {
* data: 'b',
* label: 'Option with indicator',
* indicator: 'next'
* } )
* ]
* } );
* $( document.body ).append( select.$element );
*
* ResourceLoader module: `oojs-ui-core`
*
* @see https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.DecoratedOptionWidget
*/
interface DecoratedOptionWidget extends DecoratedOptionWidget.Props, DecoratedOptionWidget.Prototype {}
namespace DecoratedOptionWidget {
interface ConfigOptions
extends OptionWidget.ConfigOptions, mixin.IconElement.ConfigOptions, mixin.IndicatorElement.ConfigOptions
{}
interface Static extends OptionWidget.Static, mixin.IconElement.Static, mixin.IndicatorElement.Static {}
interface Props extends OptionWidget.Props, mixin.IconElement.Props, mixin.IndicatorElement.Props {}
interface Prototype
extends OptionWidget.Prototype, mixin.IconElement.Prototype, mixin.IndicatorElement.Prototype
{}
interface Constructor {
/** @param config Configuration options */
new(config?: ConfigOptions): DecoratedOptionWidget;
prototype: Prototype;
static: Static;
super: OptionWidget.Constructor;
/** @deprecated Use `super` instead */
parent: OptionWidget.Constructor;
}
}
const DecoratedOptionWidget: DecoratedOptionWidget.Constructor;
}