How to use the ember-bootstrap/components/base/bs-form/element/layout/horizontal.extend function in ember-bootstrap

To help you get started, we’ve selected a few ember-bootstrap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kaliber5 / ember-bootstrap / addon / components / bs4 / bs-form / element / layout / horizontal.js View on Github external
import FormElementLayoutHorizontal from 'ember-bootstrap/components/base/bs-form/element/layout/horizontal';
import { computed } from '@ember/object';
import { isBlank } from '@ember/utils';

export default FormElementLayoutHorizontal.extend({
  /**
   * Computed property that specifies the Bootstrap offset grid class for form controls within a horizontal layout
   * form, that have no label.
   *
   * @property horizontalInputOffsetGridClass
   * @type string
   * @readonly
   * @private
   */
  horizontalInputOffsetGridClass: computed('horizontalLabelGridClass', function() {
    if (isBlank(this.get('horizontalLabelGridClass'))) {
      return;
    }
    let parts = this.get('horizontalLabelGridClass').split('-');
    parts.splice(0, 1, 'offset');
    return parts.join('-');
github kaliber5 / ember-bootstrap / addon / components / bs3 / bs-form / element / layout / horizontal.js View on Github external
import FormElementLayoutHorizontal from 'ember-bootstrap/components/base/bs-form/element/layout/horizontal';
import { computed } from '@ember/object';
import { isBlank } from '@ember/utils';

export default FormElementLayoutHorizontal.extend({
  /**
   * Computed property that specifies the Bootstrap offset grid class for form controls within a horizontal layout
   * form, that have no label.
   *
   * @property horizontalInputOffsetGridClass
   * @type string
   * @readonly
   * @private
   */
  horizontalInputOffsetGridClass: computed('horizontalLabelGridClass', function() {
    if (isBlank(this.get('horizontalLabelGridClass'))) {
      return;
    }
    let parts = this.get('horizontalLabelGridClass').split('-');
    parts.splice(2, 0, 'offset');
    return parts.join('-');