Skip to content

Instantly share code, notes, and snippets.

View evs-chris's full-sized avatar

Chris Reeves evs-chris

View GitHub Profile
@evs-chris
evs-chris / ractive-tabs.html
Created July 11, 2017 21:33
Tab component for 0.9+
<div class-rtabs {{yield extra-attributes}}>
<div class-tab-window {{#if .direction === 'left'}}class-going-left{{else}}class-going-right{{/if}}>
<div class-tabs>
<div class="left-tabs">
{{#each .tabs}}{{#unless .right}}{{>tab}}{{/unless}}{{/each}}
</div>
<div class="right-tabs">
{{#each .tabs}}{{#if .right}}{{>tab}}{{/if}}{{/each}}
</div>
<div class="selection-indicator" style-left="{{.selectedLeft}}px" {{#if .selectedRight !== undefined}}style-right="{{.selectedRight}}px"{{/if}} />