| Index: sky/framework/components/popup_menu.dart
|
| diff --git a/sky/framework/components/popup_menu.dart b/sky/framework/components/popup_menu.dart
|
| index 4a4aca66f97e85456ba5ae946b02369b1403a06e..8ed4e6c0b4e10967d85b885424371792b8740c9a 100644
|
| --- a/sky/framework/components/popup_menu.dart
|
| +++ b/sky/framework/components/popup_menu.dart
|
| @@ -5,19 +5,27 @@
|
| import '../fn.dart';
|
| import '../theme/colors.dart';
|
| import 'material.dart';
|
| +import 'popup_menu_item.dart';
|
|
|
| class PopupMenu extends Component {
|
| static final Style _style = new Style('''
|
| border-radius: 2px;
|
| + padding: 8px 0;
|
| background-color: ${Grey[50]};'''
|
| );
|
|
|
| - List<Node> children;
|
| + List<List<Node>> items;
|
| int level;
|
|
|
| - PopupMenu({ Object key, this.children, this.level }) : super(key: key);
|
| + PopupMenu({ Object key, this.items, this.level }) : super(key: key);
|
|
|
| Node build() {
|
| + List<Node> children = [];
|
| + int i = 0;
|
| + items.forEach((List<Node> item) {
|
| + children.add(new PopupMenuItem(key: i++, children: item));
|
| + });
|
| +
|
| return new Material(
|
| style: _style,
|
| children: children,
|
|
|