Created
March 3, 2021 23:58
-
-
Save chriskrycho/df917abb02f973f46e4affe04bd196dd to your computer and use it in GitHub Desktop.
dumb
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 Controller from '@ember/controller'; | |
| import { inject as service } from '@ember/service'; | |
| import { tracked } from '@glimmer/tracking'; | |
| export default class ApplicationController extends Controller { | |
| @service whatToRender; | |
| @tracked value = true; | |
| toggle = () => { | |
| this.value = !this.value; | |
| } | |
| } |
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 Helper from '@ember/component/helper'; | |
| import { inject as service } from '@ember/service'; | |
| export default class Boo extends Helper { | |
| @service whatToRender; | |
| compute([yayOrNay]) { | |
| this.whatToRender.yayOrNay = yayOrNay; | |
| } | |
| } |
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 Service from '@ember/service'; | |
| import { tracked } from '@glimmer/tracking'; | |
| export default class WhatToRender extends Service { | |
| @tracked yayOrNay = false; | |
| } |
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; | |
| } | |
| .parent { | |
| display: flex; | |
| flex-wrap: wrap; | |
| max-width: 200px; | |
| border: 1px solid; | |
| } | |
| .child { | |
| flex: 1 0 100px; | |
| background: skyblue; | |
| } | |
| .child.nay { | |
| flex: 1 0 100%; | |
| background: lightgray; | |
| } |
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.17.1", | |
| "EmberENV": { | |
| "FEATURES": {}, | |
| "_TEMPLATE_ONLY_GLIMMER_COMPONENTS": false, | |
| "_APPLICATION_TEMPLATE_WRAPPER": true, | |
| "_JQUERY_INTEGRATION": true | |
| }, | |
| "options": { | |
| "use_pods": false, | |
| "enable-testing": false | |
| }, | |
| "dependencies": { | |
| "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js", | |
| "ember": "3.18.1", | |
| "ember-template-compiler": "3.18.1", | |
| "ember-testing": "3.18.1" | |
| }, | |
| "addons": { | |
| "@glimmer/component": "1.0.0" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment