Skip to content

Commit

Permalink
docs(menu): update demos
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Oct 22, 2023
1 parent 548dbc3 commit 19d489b
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 121 deletions.
19 changes: 19 additions & 0 deletions elements/rh-menu/demo/color-context.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<rh-context-picker target="context"></rh-context-picker>

<rh-context-provider id="context" color-palette="darkest">
<rh-menu>
<rh-button slot="button">Toggle Links</rh-button>
<a href="#">Link1</a>
<a href="#">Link2</a>
<a href="#">Link3</a>
<a href="#">Link4</a>
</rh-menu>
</rh-context-provider>

<script type="module">
import '@rhds/elements/rh-menu/rh-menu.js';
import '@rhds/elements/rh-context-provider/rh-context-provider.js';
import '@rhds/elements/rh-context-picker/rh-context-picker.js';
import '@rhds/elements/rh-button/rh-button.js';
</script>

11 changes: 0 additions & 11 deletions elements/rh-menu/demo/demo.css

This file was deleted.

15 changes: 15 additions & 0 deletions elements/rh-menu/demo/position-left.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

<rh-menu position="left" persistent>
<rh-button slot="button">Toggle Settings</rh-button>
<rh-button variant="link">Menuitem1</rh-button>
<rh-button variant="link">Menuitem2</rh-button>
<rh-button variant="link">Menuitem3</rh-button>
<rh-button variant="link">Menuitem4</rh-button>
</rh-menu>

<script type="module">
import '@rhds/elements/rh-menu/rh-menu.js';
import '@rhds/elements/rh-button/rh-button.js';
import '@rhds/elements/rh-tooltip/rh-tooltip.js';
</script>

13 changes: 13 additions & 0 deletions elements/rh-menu/demo/position-right.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<rh-menu position="right">
<rh-button slot="button">Toggle Links</rh-button>
<a href="#">Link1</a>
<a href="#">Link2</a>
<a href="#">Link3</a>
<a href="#">Link4</a>
</rh-menu>

<script type="module">
import '@rhds/elements/rh-menu/rh-menu.js';
import '@rhds/elements/rh-button/rh-button.js';
</script>

15 changes: 15 additions & 0 deletions elements/rh-menu/demo/position-top.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<rh-menu position="top">
<rh-button slot="button">Toggle Menu</rh-button>
<rh-button variant="link">Menuitem1</rh-button>
<rh-button variant="link">Menuitem2</rh-button>
<rh-button variant="link">Menuitem3</rh-button>
<rh-button variant="link">Menuitem4</rh-button>
</rh-menu>

<script type="module">
import 'element-internals-polyfill';
import '@rhds/elements/rh-menu/rh-menu.js';
import '@rhds/elements/rh-button/rh-button.js';
import '@rhds/elements/rh-tooltip/rh-tooltip.js';
</script>

104 changes: 0 additions & 104 deletions elements/rh-menu/demo/positioning.html

This file was deleted.

1 change: 0 additions & 1 deletion elements/rh-menu/demo/rh-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
</rh-menu>

<script type="module">
import 'element-internals-polyfill';
import '@rhds/elements/rh-menu/rh-menu.js';
import '@rhds/elements/rh-button/rh-button.js';
</script>
Expand Down
5 changes: 0 additions & 5 deletions elements/rh-menu/demo/rh-menu.js

This file was deleted.

0 comments on commit 19d489b

Please sign in to comment.