jenkins-bot has submitted this change and it was merged.
Change subject: PopupButtonWidget: Add description and example and mark private
method
......................................................................
PopupButtonWidget: Add description and example and mark private method
Change-Id: I452244a03770fca2544c8abe361ca40a08c57b08
---
M src/widgets/PopupButtonWidget.js
1 file changed, 18 insertions(+), 1 deletion(-)
Approvals:
Jforrester: Looks good to me, approved
jenkins-bot: Verified
diff --git a/src/widgets/PopupButtonWidget.js b/src/widgets/PopupButtonWidget.js
index bd6f306..4300239 100644
--- a/src/widgets/PopupButtonWidget.js
+++ b/src/widgets/PopupButtonWidget.js
@@ -1,5 +1,20 @@
/**
- * Button that shows and hides a popup.
+ * PopupButtonWidgets toggle the visibility of a contained {@link
OO.ui.PopupWidget PopupWidget},
+ * which is used to display additional information or options.
+ *
+ * @example
+ * // Example of a popup button.
+ * var popupButton = new OO.ui.PopupButtonWidget( {
+ * label: 'Popup button with options',
+ * icon: 'menu',
+ * popup: {
+ * $content: $( '<p>Additional options here.</p>' ),
+ * padded: true,
+ * align: 'left'
+ * }
+ * } );
+ * // Append the button to the DOM.
+ * $( 'body' ).append( popupButton.$element );
*
* @class
* @extends OO.ui.ButtonWidget
@@ -34,6 +49,8 @@
/**
* Handle the button action being triggered.
+ *
+ * @private
*/
OO.ui.PopupButtonWidget.prototype.onAction = function () {
this.popup.toggle();
--
To view, visit https://gerrit.wikimedia.org/r/192485
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I452244a03770fca2544c8abe361ca40a08c57b08
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Kmenger <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits