Skip to content

Instantly share code, notes, and snippets.

@csuwildcat
Last active December 28, 2015 06:48
Show Gist options
  • Select an option

  • Save csuwildcat/7459279 to your computer and use it in GitHub Desktop.

Select an option

Save csuwildcat/7459279 to your computer and use it in GitHub Desktop.
// This case:
<x-deck id="foo">
<x-card>Card 1</x-card>
<x-card>Card 2</x-card>
<x-card>Card 3</x-card>
</x-deck>
<menu>
<x-command label="Tab 1" targets="#foo x-card:nth-child(1)"></x-command>
<x-command label="Tab 2" targets="#foo x-card:nth-child(2)"></x-command>
<x-command label="Tab 3" targets="#foo x-card:nth-child(3)"></x-command>
</menu>
// Can be just as easy as this case:
<x-appbar title="My App">
<x-actionbar>
<x-command icon="/pencil.png" targets="#bar" invoke="slideTo(0)"></x-command>
<x-command icon="/paper.png" targets="#bar" invoke="slideTo(1)"></x-command>
<x-command icon="/save.png" targets="#bar" invoke="slideTo(2)"></x-command>
</x-actionbar>
</x-appbar>
<x-slidebox id="bar">
<x-slide>Card 1</x-slide>
<x-slide>Card 2</x-slide>
<x-slide>Card 3</x-slide>
</x-slidebox>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment