Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit 4895a5f

Browse files
Kevin Mansontremblaymath
authored andcommitted
docs(oui-action-menu): improve action-menu demo page
1 parent 7115a7c commit 4895a5f

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

packages/oui-action-menu/README.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,40 @@
77
### Normal
88

99
```html:preview
10+
<div class="oui-doc-preview-only-keep-children" ng-init="$ctrl.action1 = false; $ctrl.action2 = false; $ctrl.action3 = false">
1011
<oui-action-menu
1112
text="Actions"
1213
aria-label="Server: actions"
1314
align="start">
1415
<oui-action-menu-item
1516
text="Action 1"
1617
aria-label="Server: action 1"
17-
on-click="$ctrl.showCurrentValueInPopup('Action 1')"></oui-action-menu-item>
18+
on-click="$ctrl.action1 = true"></oui-action-menu-item>
1819
<oui-action-menu-item
1920
text="Action 2"
2021
aria-label="Server: action 2"
21-
on-click="$ctrl.showCurrentValueInPopup('Action 2')"></oui-action-menu-item>
22+
on-click="$ctrl.action2 = true"></oui-action-menu-item>
2223
<oui-action-menu-item
2324
text="Action 3 (disabled)"
2425
aria-label="Server: action 3"
25-
on-click="$ctrl.showCurrentValueInPopup('Action 3')"
26+
on-click="$ctrl.action3 = true"
2627
disabled></oui-action-menu-item>
2728
<oui-action-menu-divider></oui-action-menu-divider>
2829
<oui-action-menu-item
2930
text="Lien externe"
3031
href="#"
3132
external></oui-action-menu-item>
3233
</oui-action-menu>
34+
<div>Action 1: {{$ctrl.action1}}</div>
35+
<div>Action 2: {{$ctrl.action2}}</div>
36+
<div>Action 3: {{$ctrl.action3}}</div>
37+
</div>
3338
```
3439

3540
### Compact
3641

3742
```html:preview
43+
<div class="oui-doc-preview-only-keep-children" ng-init="$ctrl.action1_1 = false; $ctrl.action2_1 = false; $ctrl.action3_1 = false">
3844
<div class="oui-action-menu-container">
3945
<oui-action-menu
4046
aria-label="Server: actions"
@@ -43,22 +49,26 @@
4349
<oui-action-menu-item
4450
text="Action 1"
4551
aria-label="Server: action 1"
46-
on-click="$ctrl.showCurrentValueInPopup('Action 1')"></oui-action-menu-item>
52+
on-click="$ctrl.action1_1 = true"></oui-action-menu-item>
4753
<oui-action-menu-item
4854
text="Action 2"
4955
aria-label="Server: action 2"
50-
on-click="$ctrl.showCurrentValueInPopup('Action 2')"></oui-action-menu-item>
56+
on-click="$ctrl.action2_1 = true"></oui-action-menu-item>
5157
<oui-action-menu-item
5258
text="Action 3 (disabled)"
5359
aria-label="Server: action 3"
54-
on-click="$ctrl.showCurrentValueInPopup('Action 3')"
60+
on-click="$ctrl.action3_1 = true"
5561
disabled></oui-action-menu-item>
5662
<oui-action-menu-divider></oui-action-menu-divider>
5763
<oui-action-menu-item
5864
text="Lien externe"
5965
href="#"
6066
external></oui-action-menu-item>
6167
</oui-action-menu>
68+
<div>Action 1: {{$ctrl.action1_1}}</div>
69+
<div>Action 2: {{$ctrl.action2_1}}</div>
70+
<div>Action 3: {{$ctrl.action3_1}}</div>
71+
</div>
6272
</div>
6373
```
6474

packages/oui-action-menu/src/action-menu-item.component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ export default {
88
ariaLabel: "@?",
99
href: "@?",
1010
external: "<?",
11-
onClick: "&?"
11+
onClick: "&"
1212
}
1313
};

0 commit comments

Comments
 (0)