Skip to content

Instantly share code, notes, and snippets.

View robomalo's full-sized avatar

John Robinson Jr. robomalo

  • LinkedIn
  • San Francisco, California
View GitHub Profile
import Component from '@glimmer/component';
export default class extends Component {
get title() {
return this.args.model.title;
}
get content() {
return this.args.model.content;
}
@robomalo
robomalo / components.button-row\.js
Last active February 10, 2023 22:41
Button Bar
import Component from '@glimmer/component';
const ALIGN = {
start: 'button-row--start',
center: 'button-row--center',
end: 'button-row--end',
stretch: 'button-row--stretch',
flush: 'button-row--flush',
'space-around': 'button-row--space-around',
'space-between': 'button-row--space-between',
@robomalo
robomalo / components.block\.js
Last active May 5, 2023 21:31
Block Component
import Component from '@glimmer/component';
// Need to support auto and 0 as params
function getClassName(type, edge, unit) {
if (unit === '0') {
return '';
}
return `${type}${edge}-${unit}`;
@robomalo
robomalo / components.item-row\.js
Last active April 26, 2022 20:47
Hover thinger
import Component from '@glimmer/component';
import { action } from '@ember/object';
export default class ItemRow extends Component {}
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
import Ember from 'ember';
export default Ember.Component.extend({
hasMessage: false,
actions: {
toggleMessage() {
this.toggleProperty('hasMessage');
},
}
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super();
this.set('inputId', this.elementId);
},
});
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Component.extend({
});