Skip to content

Instantly share code, notes, and snippets.

@pzuraq
Created July 22, 2019 15:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
{{! calling side }}
<Tabs>
<:tab name="index.js">
<Snippet name="2-mirage-index" />
<:/tab>
<:tab name="App.js">
<Snippet name="2-mirage-app" />
<:/tab>
</Tabs>
{{! Tabs template }}
<div>
{{#each this.blocks.tab as |tab|}}
<button
{{on "click" this.setActiveTab tab}}
class="
{{if (eq this.activeTab tab)
"text-gray-900 text-border-gray-900"
"text-gray-400 border-gray-200"
}}
"
/>
{{tab.args.name}}
</button>
{{/each}}
<div class="mt-6">
{{yield to=this.activeTab}}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment