calculator-plugin
Advanced tools
Comparing version 1.1.1 to 2.0.0
26
index.js
@@ -0,2 +1,10 @@ | ||
const initState = { | ||
containerStyle: {} | ||
}; | ||
class Calculator { | ||
constructor(state = initState) { | ||
this.state = state; | ||
} | ||
sum(num1, num2) { | ||
@@ -13,18 +21,14 @@ return num1 + num2; | ||
} | ||
} | ||
class CalculatorUi { | ||
containerStyle = {}; | ||
constructor({ containerStyle }) { | ||
this.containerStyle = containerStyle; | ||
} | ||
ui() { | ||
const container = document.getElementById('calculator-container'); | ||
container.innerHTML = `<h1> CalculatorUi Container </h1>`; | ||
container.innerHTML = ` | ||
<h1> CalculatorUi Container </h1> | ||
<input type="number" /> | ||
<hr/> | ||
<button>Calculate </button> | ||
`; | ||
} | ||
} | ||
this.Calculator = Calculator; | ||
this.CalculatorUi = CalculatorUi; | ||
this.Calculator = Calculator; |
{ | ||
"name": "calculator-plugin", | ||
"version": "1.1.1", | ||
"version": "2.0.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
793
26