-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(collapsible): add the collapsible widget
- Loading branch information
1 parent
be3f033
commit c48c18c
Showing
2 changed files
with
50 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
import {customAttribute, bindable,inject} from 'aurelia-framework'; | ||
import $ from 'jquery'; | ||
|
||
@customAttribute('material-collapsible') | ||
@bindable({ name: 'accordion', defaultValue: false }) | ||
@inject(Element) | ||
export class MaterialCollapsible { | ||
constructor(element) { | ||
this.element = element; | ||
} | ||
attached() { | ||
$(this.element).collapsible({ | ||
accordion : this.accordion // A setting that changes the collapsible behavior to expandable instead of the default accordion style | ||
}); | ||
} | ||
import {customAttribute, bindable} from 'aurelia-templating'; | ||
import {inject} from 'aurelia-dependency-injection'; | ||
import $ from 'jquery'; | ||
|
||
@customAttribute('material-collapsible') | ||
@bindable({ name: 'accordion', defaultValue: false }) | ||
@inject(Element) | ||
export class MaterialCollapsible { | ||
constructor(element) { | ||
this.element = element; | ||
} | ||
|
||
attached() { | ||
$(this.element).collapsible({ | ||
accordion : this.accordion | ||
}); | ||
} | ||
} |