Skip to content

Commit

Permalink
Replace id with data-type=${type}
Browse files Browse the repository at this point in the history
  • Loading branch information
ninabreznik committed Feb 21, 2019
1 parent 2e3991a commit 0407cb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -11070,8 +11070,8 @@ function displayIntegerInput({theme: {classes: css}, type, cb}) {
var min = validator.getRange(type).MIN
var max = validator.getRange(type).MAX
var title = `Valid values for type ${type} are from ${min} to ${max}`
var num = bel`<input id=${type} type="text" class=${css.integerValue} value="0" oninput=${(e)=>sliderUpdate(e, type)} onkeydown=${(e)=>keysUpdating(e, type)}>`
var slider = bel`<input id=${type} class=${css.integerSlider} type="range" title=${title} min=${min} max=${max} value="0" step=1 oninput=${(e)=>numUpdate(e, type)}>`
var num = bel`<input data-type=${type} type="text" class=${css.integerValue} value="0" oninput=${(e)=>sliderUpdate(e, type)} onkeydown=${(e)=>keysUpdating(e, type)}>`
var slider = bel`<input data-type=${type} class=${css.integerSlider} type="range" title=${title} min=${min} max=${max} value="0" step=1 oninput=${(e)=>numUpdate(e, type)}>`
return bel`
<div class=${css.integerField}>
${slider}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "input-integer",
"version": "3.0.4",
"version": "3.0.5",
"description": "An integer-input-type component built with bel and csjs-inject",
"main": "src/index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function displayIntegerInput({theme: {classes: css}, type, cb}) {
var min = validator.getRange(type).MIN
var max = validator.getRange(type).MAX
var title = `Valid values for type ${type} are from ${min} to ${max}`
var num = bel`<input id=${type} type="text" class=${css.integerValue} value="0" oninput=${(e)=>sliderUpdate(e, type)} onkeydown=${(e)=>keysUpdating(e, type)}>`
var slider = bel`<input id=${type} class=${css.integerSlider} type="range" title=${title} min=${min} max=${max} value="0" step=1 oninput=${(e)=>numUpdate(e, type)}>`
var num = bel`<input data-type=${type} type="text" class=${css.integerValue} value="0" oninput=${(e)=>sliderUpdate(e, type)} onkeydown=${(e)=>keysUpdating(e, type)}>`
var slider = bel`<input data-type=${type} class=${css.integerSlider} type="range" title=${title} min=${min} max=${max} value="0" step=1 oninput=${(e)=>numUpdate(e, type)}>`
return bel`
<div class=${css.integerField}>
${slider}
Expand Down

0 comments on commit 0407cb6

Please sign in to comment.