d-md-components
Version:
A pack of components for Derby according to Google's Material Design based upon mdl (getmdl.io).
53 lines (43 loc) • 907 B
Markdown
A progressbar component.
Features
--------
- Progress bar styled according to material design, based on mdl.
- Undetermined progress.
Usage
-----
```javascript
var mdlComponents = require('d-md-components');
app.component(mdlComponents.Progress);
```
```html
<view
is="progress"
as="$progress"
class="extraClass"
accent="#FF0000"
/>
<button on-click="doTimeConsumingTask()">Load</button>
```
```javascript
Component.prototype.doTimeConsumingTask = function() {
this.$progress.show();
// Simulate task with callback
var self = this;
setTimeout(function () {
self.$progress.hide();
}, 3000);
};
```
Methods:
-----
Shows the progressbar.
Hides the progressbar.
TODO:
-----
Add support for determined length progress bar (1-100%).