Page MenuHomePhabricator
Paste P4786

popup and dropdown
ActivePublic

Authored by Prtksxna on Jan 24 2017, 9:57 AM.
diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index cb65cb7..adaa649 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1845,6 +1845,40 @@ OO.ui.Demo.static.pages.widgets = function ( demo ) {
}
),
new OO.ui.FieldLayout(
+ new OO.ui.DropdownWidget( {
+ label: 'Select one',
+ menu: {
+ items: [
+ new OO.ui.MenuOptionWidget( {
+ data: 'a',
+ label: 'First'
+ } ),
+ new OO.ui.MenuOptionWidget( {
+ data: 'b',
+ label: 'Second',
+ indicator: 'alert'
+ } ),
+ new OO.ui.MenuOptionWidget( {
+ data: 'c',
+ label: 'Third'
+ } ),
+ new OO.ui.MenuOptionWidget( {
+ data: 'c',
+ label: 'The fourth option has a long label'
+ } ),
+ new OO.ui.MenuOptionWidget( {
+ data: 'd',
+ label: 'Fifth'
+ } )
+ ]
+ }
+ } ),
+ {
+ label: 'DropdownWidget',
+ align: 'top'
+ }
+ ),
+ new OO.ui.FieldLayout(
new OO.ui.PopupButtonWidget( {
icon: 'info',
framed: false,