Skip to content

Instantly share code, notes, and snippets.

@nicksteffens
Last active March 25, 2022 16:36
Show Gist options
  • Save nicksteffens/99bdd9561d8abde82ce16ec63f03547b to your computer and use it in GitHub Desktop.
Save nicksteffens/99bdd9561d8abde82ce16ec63f03547b to your computer and use it in GitHub Desktop.
Block Drawer
import Component from '@glimmer/component';
export default class extends Component {
}
import Controller from '@ember/controller';
import { action } from '@ember/object';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
<button
class="fluid-button type:primary my-4"
{{on 'click' this.toggle}}
>
Toggle Drawer
</button>
<div class="flex flex-cols">
<nav class="w-4/12 border border-black">
Sidebar
{{if this.isEditing "Show Drawer"}}
</nav>
<div class="w-8/12 border border-red-400 relative">
<div class="transition-all duration-1000 absolute w-full bg-neutral-400 {{if this.isEditing
"left-0" "left-full"}}">
Drawer
</div>
<div>
Block Content
</div>
</div>
</div>
{
"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",
"tailwind-css": "https://unpkg.com/@movable/tailwind-config/dist/fluid-tailwind.min.css",
"ember-set-helper": "2.0.1"
},
"addons": {
"@glimmer/component": "1.0.0",
"@movableink/fluid": "0.0.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment