Skip to content

Instantly share code, notes, and snippets.

@alvincrespo
Last active August 18, 2022 17:34
Show Gist options
  • Save alvincrespo/9e57623dcf60265bca2f to your computer and use it in GitHub Desktop.
Save alvincrespo/9e57623dcf60265bca2f to your computer and use it in GitHub Desktop.
fly-components/addon/components/fly-panel.js
// fly-components/addon/components/fly-panel.js
import Ember from 'ember';
import layout from '../templates/components/fly-panel';
export default Ember.Component.extend({
tagName: 'div',
classNames: ['fly-panel'],
layout: layout,
header: null,
subHeader: null,
content: null
});
// fly-components/addon/templates/fly-panel.hbs
{{#if template}}
{{yield}}
{{else}}
{{fly-panel-header content=header}}
{{fly-panel-header
classNames="fly-panel-sub-header"
content=subHeader}}
{{fly-panel-body content=content}}
{{fly-panel-footer content=footer}}
{{/if}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment