ember-cli-lightning-design-system
Version:
Easy installation and reusable components for the salesforce lightning design system.
22 lines (17 loc) • 512 B
JavaScript
import { computed } from '@ember/object';
import Component from '@ember/component';
import layout from '../templates/components/slds-illustration';
const sizeMap = {
small: 'slds-illustration_small',
large: 'slds-illustration_large'
};
export default Component.extend({
layout,
classNames: ['slds-illustration'],
classNameBindings: ['sizeClass'],
size: 'small',
sizeClass: computed('size', function() {
const size = this.get('size');
return sizeMap[size];
})
});