Skip to content

Instantly share code, notes, and snippets.

@jonathanharrell
Created September 25, 2018 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanharrell/8720766b5ee7dd4f18112269616a9fa6 to your computer and use it in GitHub Desktop.
Save jonathanharrell/8720766b5ee7dd4f18112269616a9fa6 to your computer and use it in GitHub Desktop.
AccordionPanel Component Using Provide/Inject
Vue.component('accordion-panel', {
inject: ['accordionItemState'],
template: `
<div class="accordion-panel" :class="{ expanded: accordionItemState.expanded }">
<slot></slot>
</div>
`
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment