ember-dashboard-controls
v1.0.0
Published
A simple Ember wrapper for the Bootstrap Dashboard theme.
Downloads
25
Readme
Ember Dashboard Controls
Description
This Ember Addon simply wraps some of the new controls available in the Dashboard Bootstrap Theme into an easy to use addon.
This addon is still a work in progress.
N.B. The theme itself is not included in this addon since it is a premium theme and requires a purchase.
Installation
Like most ember addons, simply run ember install ember-dashboard-controls
and you should be all set.
Docs
Dashhead
The Dashhead currently exposes the titles
and toolbar
components which can be used to create the left and right side of the dashhead component respectively.
Titles
The titles
component exposes the title
and subtitle
components which can be used to display the title and subtitle in the Dashhead.
Toolbar
The toolbar
currently only exposes the divider
component which is used to create vertical dividers inside the toolbar. The toolbar items themselves should use the dashhead-toolbar-item
class for the time being.
Here's what a complete dashhead would look like:
{{#db-dashhead as |dashhead|}}
{{#dashhead.titles as |titles|}}
{{#titles.title}}Example Title{{/titles.title}}
{{#titles.subtitle}}Example Subtitle{{/titles.subtitle}}
{{/dashhead.titles}}
{{#dashhead.toolbar as |toolbar|}}
<div class="btn-group dashhead-toolbar-item">
<button type="button" class="btn btn-outline-primary">1</button>
<button type="button" class="btn btn-outline-primary">2</button>
</div>
{{toolbar.divider}}
<div class="btn-group dashhead-toolbar-item">
<button type="button" class="btn btn-outline-primary">3</button>
<button type="button" class="btn btn-outline-primary">4</button>
</div>
{{/dashhead.toolbar}}
{{/db-dashhead}}
Icon Navigation
The Icon Navigation currently exposes the brand
and items
components which can be used to create the brand and navigation items of your icon menu.
Brand
The brand
component can be configured via the icon
and destination
properties. As you've probably guessed already the icon
property lets you define the icon class that will be applied to your brand and the destination
property will let you dictate the navigation target of the brand element.
Items
The items
component exposes the item
component which together are combined to create the menu items.
Item
The actual navigation item can be configured using the icon
, label
and destination
properties.
Here's what a complete iconav would look like:
{{#db-iconav as |nav|}}
{{nav.brand icon="icon icon-home"}}
{{#nav.items as |items|}}
{{items.item icon="icon icon-home" label="Home"}}
{{items.item icon="icon icon-user" label="Profile"}}
{{items.item icon="icon icon-gauge" label="Dashboard"}}
{{/nav.items}}
{{/db-iconav}}
List Group
The List Group currently exposes the header
and item
components in order to enable the creation of list groups.
{{#db-list-group as |lg|}}
{{lg.header text="Header"}}
{{! Item inline style }}
{{lg.item class="item-1" text="text 1" progress=25}}
{{! Item block style }}
{{#lg.item class="item-2" progress=33}}
text 2
{{/lg.item}}
{{/db-list-group}}
Contributions
Any contribution is more than welcomed. If you plan on introducing a new feature, please open an issue and share your idea prior to implementing it, it could save you precious time!
Troubleshooting
If something is not working as expected, simply open an issue and we'll discuss how we'll go about fixing it!