2019-10-16 17:38:45 +13:00
|
|
|
<script>
|
|
|
|
|
|
|
|
export let value="";
|
|
|
|
export let className = "default";
|
|
|
|
export let type = "text";
|
|
|
|
|
|
|
|
export let _bb;
|
|
|
|
|
|
|
|
let actualValue = "";
|
|
|
|
|
|
|
|
const onchange = (ev) => {
|
|
|
|
if(_bb) {
|
2019-10-19 19:24:20 +13:00
|
|
|
_bb.setStateFromBinding(_bb.props.value, ev.target.value);
|
2019-10-16 17:38:45 +13:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<input class={className}
|
|
|
|
type={type}
|
|
|
|
value={value}
|
|
|
|
on:change={onchange}/>
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.default {
|
|
|
|
width: 100%;
|
|
|
|
font-family: inherit;
|
|
|
|
font-size: inherit;
|
|
|
|
padding: 0.4em;
|
|
|
|
margin: 0 0 0.5em 0;
|
|
|
|
box-sizing: border-box;
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
border-radius: 2px;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.default:disabled {
|
|
|
|
color: #ccc;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|