Kmenger has uploaded a new change for review. https://gerrit.wikimedia.org/r/194381
Change subject: DecoratedOptionWidget: Add description and example ...................................................................... DecoratedOptionWidget: Add description and example Change-Id: I58784524c0be7853140c6245e8f685ecf4d1612c --- M src/widgets/DecoratedOptionWidget.js 1 file changed, 24 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/81/194381/1 diff --git a/src/widgets/DecoratedOptionWidget.js b/src/widgets/DecoratedOptionWidget.js index 9fd8ee8..ca5acb6 100644 --- a/src/widgets/DecoratedOptionWidget.js +++ b/src/widgets/DecoratedOptionWidget.js @@ -1,7 +1,29 @@ /** - * Option widget with an option icon and indicator. + * DecoratedOptionWidgets are {@link OO.ui.OptionWidget options} that can be configured + * with an {@link OO.ui.IconElement icon} and/or {@link OO.ui.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 + * [OOjs UI documentation on MediaWiki][1]. * - * Use together with OO.ui.SelectWidget. + * @example + * // 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' + * } ) + * ] + * } ); + * $('body').append(select.$element); + * + * [1]: https://www.mediawiki.org/wiki/OOjs_UI/Widgets/Selects_and_Options * * @class * @extends OO.ui.OptionWidget -- To view, visit https://gerrit.wikimedia.org/r/194381 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I58784524c0be7853140c6245e8f685ecf4d1612c Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui Gerrit-Branch: master Gerrit-Owner: Kmenger <kmen...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits