Skip to content

Instantly share code, notes, and snippets.

View lstrrs's full-sized avatar

Luis Torres lstrrs

View GitHub Profile
import Ember from 'ember';
import hexColor from '../utils/hex-color';
const {
Controller,
computed
} = Ember;
export default Controller.extend({
/**
import Ember from 'ember';
export default Ember.Component.extend({
classNames: 'x-input',
tagName: 'p',
attributeBindings: ['dataFieldName:data-field-name'],
dataFieldName: Ember.computed('label', function() {
@lstrrs
lstrrs / application.controller.js
Last active October 19, 2017 01:18 — forked from Serabe/application.controller.js
Simple dynamic component
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
});
@lstrrs
lstrrs / components.line-clamp.js
Last active August 31, 2017 18:11
Line Clamp
import Ember from 'ember';
export default Ember.Component.extend({
componentName: 'LineClamp',
//tagName: 'span',
text: '',
truncatedText: '',
@lstrrs
lstrrs / components.line-clamp.js
Last active August 31, 2017 17:56
Line Clamp 2
import Ember from 'ember';
export default Ember.Component.extend({
componentName: 'LineClamp',
//tagName: 'span',
text: '',
truncatedText: '',
@lstrrs
lstrrs / components.share-box.js
Last active October 27, 2017 03:44
Share-Box
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
this.shareText = "Test";
this._shareText = "Test Test";
},
import Ember from 'ember';
export default Ember.Component.extend({
shareText: '',
word: '',
actions: {
onShareEditorValueChanged(shareEditorValue) {
this.set('shareText', shareEditorValue);
import Ember from 'ember';
import UIButton from './ui-button';
import layout from '../templates/components/ui-button';
export default UIButton.extend({
classNames: ['ui-button--secondary'],
});
@lstrrs
lstrrs / components.ui-component.js
Last active December 19, 2017 21:43
UIElements
import Ember from 'ember';
/**
* mb - margin-bottom
* mt - margin-top
*/
export default Ember.Component.extend({
//classNames: ['ui-component'],
classNameBindings: ['_mb', '_mt'],
import Ember from 'ember';
import UIButton from './ui-button';
import styled from '../utils/styled';
//export default styled(UIButton);
export default styled.button`
background: purple;
color: white;
padding: 20px;