How to use the yox.string function in yox

To help you get started, we’ve selected a few yox 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 divawth / bell-ui / src / component / rate / Rate.ts View on Github external
hoverOnHalfIcon(element: HTMLElement) {
      return Yox.string.has(element.className, 'half')
    }
  },
github divawth / bell-ui / dist / components / grid / Row.js View on Github external
inlineStyle: function () {
            var gap = 0;
            var style = '';
            if (this.get('style')
                && Yox.string.trim(this.get('style'))
                && !Yox.string.endsWith(style, ';')) {
                style += ';';
            }
            if (this.get('gutter')) {
                gap = +this.get('gutter') / 2;
            }
            return style + "margin-left: -" + gap + "px; margin-right: -" + gap + "px;";
        }
    }
github divawth / bell-ui / src / component / badge / Badge.ts View on Github external
updatePosition() {
      if (supportTransform) {
        return
      }
      const append = this.$refs.append as HTMLElement
      if (!append || !Yox.string.has(append.className, '${prefix}badge-text-append')) {
        return
      }
      append.style.marginLeft = -0.5 * append.offsetWidth + 'px'
      append.style.marginTop = -0.5 * append.offsetHeight + 'px'
    }
  },
github divawth / bell-ui / src / component / grid / Row.ts View on Github external
inlineStyle(): string {
      let gap = 0
      let style = ''
      if (this.get('style')
        && Yox.string.trim(this.get('style'))
        && !Yox.string.endsWith(style, ';')
      ) {
        style += ';'
      }
      if (this.get('gutter')) {
        gap = +this.get('gutter') / 2
      }
      return `${style}margin-left: -${gap}px; margin-right: -${gap}px;`
    }
  }
github divawth / bell-ui / dist / components / grid / Col.js View on Github external
inlineStyle: function () {
            var gap = 0;
            var style = '';
            if (this.get('style')
                && Yox.string.trim(this.get('style'))
                && !Yox.string.endsWith(style, ';')) {
                style += ';';
            }
            if (this.get('gutter')) {
                gap = +this.get('gutter') / 2;
            }
            return style + "padding-left: " + gap + "px; padding-right: " + gap + "px";
        }
    },
github divawth / bell-ui / src / components / grid / Col.ts View on Github external
inlineStyle(): string {
      let gap = 0
      let style = ''
      if (this.get('style')
        && Yox.string.trim(this.get('style'))
        && !Yox.string.endsWith(style, ';')
      ) {
        style += ';'
      }
      if (this.get('gutter')) {
        gap = +this.get('gutter') / 2
      }
      return `${style}padding-left: ${gap}px; padding-right: ${gap}px`
    }
  },
github divawth / bell-ui / src / component / grid / Row.ts View on Github external
inlineStyle(): string {
      let gap = 0
      let style = ''
      if (this.get('style')
        && Yox.string.trim(this.get('style'))
        && !Yox.string.endsWith(style, ';')
      ) {
        style += ';'
      }
      if (this.get('gutter')) {
        gap = +this.get('gutter') / 2
      }
      return `${style}margin-left: -${gap}px; margin-right: -${gap}px;`
    }
  }
github divawth / bell-ui / dist / components / grid / Col.js View on Github external
inlineStyle: function () {
            var gap = 0;
            var style = '';
            if (this.get('style')
                && Yox.string.trim(this.get('style'))
                && !Yox.string.endsWith(style, ';')) {
                style += ';';
            }
            if (this.get('gutter')) {
                gap = +this.get('gutter') / 2;
            }
            return style + "padding-left: " + gap + "px; padding-right: " + gap + "px";
        }
    },
github divawth / bell-ui / src / component / grid / Col.ts View on Github external
inlineStyle(): string {
      let gap = 0
      let style = ''
      if (this.get('style')
        && Yox.string.trim(this.get('style'))
        && !Yox.string.endsWith(style, ';')
      ) {
        style += ';'
      }
      if (this.get('gutter')) {
        gap = +this.get('gutter') / 2
      }
      return `${style}padding-left: ${gap}px; padding-right: ${gap}px`
    }
  },
github divawth / bell-ui / src / component / grid / Col.ts View on Github external
inlineStyle(): string {
      let gap = 0
      let style = ''
      if (this.get('style')
        && Yox.string.trim(this.get('style'))
        && !Yox.string.endsWith(style, ';')
      ) {
        style += ';'
      }
      if (this.get('gutter')) {
        gap = +this.get('gutter') / 2
      }
      return `${style}padding-left: ${gap}px; padding-right: ${gap}px`
    }
  },

yox

A lightweight mvvm framework

MIT
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis