Last active
June 28, 2017 19:27
-
-
Save phillipkregg/e03c6f4a9c3fc893c2cbfd5b82c1556b to your computer and use it in GitHub Desktop.
Materialize Dropdown
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
didInsertElement() { | |
$('.dropdown-button').dropdown({ | |
inDuration: 300, | |
outDuration: 225, | |
constrainWidth: false, // Does not change width of dropdown to that of the activator | |
gutter: 0, // Spacing from edge | |
belowOrigin: true, // Displays dropdown below the button | |
alignment: 'left', // Displays dropdown with edge aligned to the left of button | |
stopPropagation: false // Stops event propagation | |
} | |
); | |
} | |
}); |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains hidden or 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
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} |
This file contains hidden or 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
{ | |
"version": "0.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0", | |
"materialize-css": "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/css/materialize.min.css", | |
"materialize-js": "https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/js/materialize.min.js" | |
}, | |
"addons": { | |
"ember-data": "2.12.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment