Skip to content

Instantly share code, notes, and snippets.

@thousand
Last active June 24, 2020 12:41
Show Gist options
  • Save thousand/0821b254eb6e12a7f2e4f1c33e94c387 to your computer and use it in GitHub Desktop.
Save thousand/0821b254eb6e12a7f2e4f1c33e94c387 to your computer and use it in GitHub Desktop.
Splat Order Demo
import Component from '@glimmer/component';
export default class extends Component {
}
import Component from '@glimmer/component';
export default class extends Component {
}
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
body {
margin: 12px 16px;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 12pt;
}
[aria-label] {
margin: 1rem;
}
[aria-label]:after {
display: block;
color: fuchsia;
padding-left: 2em;
content: attr(aria-label);
}
<SplatBefore aria-label="splats are cool">
I'm using "SplatBefore" and setting aria-label="splats are cool"
</SplatBefore>
<SplatAfter aria-label="splats are rad">
I'm using "SplatAfter" and setting aria-label="splats are rad"
</SplatAfter>
<button aria-label="splats after" ...attributes>
{{yield}}
</button>
<div ...attributes aria-label="splats before">
{{yield}}
</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"
},
"addons": {
"@glimmer/component": "1.0.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment