Comparing version 0.9.5 to 0.9.6
{ | ||
"name": "material", | ||
"version": "0.9.5", | ||
"version": "0.9.6", | ||
"description": "A lightweight implementation of Material Design Components for the web - ES6", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
import { Component, build, display } from '../index' | ||
import { Component, display } from '../index' | ||
@@ -8,11 +8,5 @@ const isStringNumber = (str) => !isNaN(parseFloat(str)) && isFinite(str) | ||
class: 'badge', | ||
mixins: [build, display] | ||
mixins: [display] | ||
} | ||
constructor (options) { | ||
super(options) | ||
this.build() | ||
} | ||
set (text) { | ||
@@ -19,0 +13,0 @@ this.element.innerHTML = text || '' |
@@ -10,5 +10,10 @@ import * as css from './css' | ||
const build = (instance) => { | ||
const { tag = 'div', class: customClass, data, base, container, schema, icon, label, show } = instance.options | ||
// console.log('name', instance.constructor.defaults) | ||
const { tag = 'div', class: customClass, data, base, container, layout, icon, label, show } = instance.options | ||
const { defaults = {} } = instance.constructor | ||
if (instance.constructor?.defaults.class === 'length') { | ||
console.log('---', instance.constructor.defaults) | ||
} | ||
instance.element = document.createElement(tag) | ||
@@ -29,4 +34,4 @@ | ||
if (schema) { | ||
setupLayout(instance, schema) | ||
if (layout) { | ||
setupLayout(instance, layout) | ||
} | ||
@@ -47,5 +52,9 @@ | ||
const setupLayout = (instance, schema) => { | ||
instance.layout = create(schema, instance.element) | ||
const setupLayout = (instance, layout) => { | ||
instance.layout = create(layout, instance.element) | ||
instance.ui = instance.layout.component | ||
if (instance.constructor.name === 'Length') { | ||
console.log(instance.ui) | ||
} | ||
} | ||
@@ -52,0 +61,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
472170
11076