UNPKG

@fleetbase/ember-ui

Version:

Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.

18 lines (14 loc) 574 B
import Component from '@glimmer/component'; import { action } from '@ember/object'; import { camelize } from '@ember/string'; export default class SpacerComponent extends Component { @action createSpacer(spacerElement) { const properties = Object.keys(this.args); for (let index = 0; index < properties.length; index++) { const prop = properties[index]; if (typeof this.args[prop] === 'string' || !isNaN(this.args[prop])) { spacerElement.style[camelize(prop)] = this.args[prop]; } } } }