parent
17422fc1e6
commit
386c2ed9ee
@ -0,0 +1,14 @@
|
||||
import {createEffect} from "solid-js";
|
||||
|
||||
import styles from "./input.module.css";
|
||||
|
||||
export default function Bool(props) {
|
||||
let {value, setValue} = props;
|
||||
|
||||
return (<input
|
||||
type="checkbox"
|
||||
class={styles.input}
|
||||
checked={value()}
|
||||
onChange={(evt) => setValue(!!evt.currentTarget.checked)}
|
||||
/>);
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
import {createEffect} from "solid-js";
|
||||
|
||||
import styles from "./input.module.css";
|
||||
|
||||
export default function CmpOp(props) {
|
||||
let {value, setValue} = props;
|
||||
let select;
|
||||
|
||||
createEffect(() => {
|
||||
select.value = value();
|
||||
});
|
||||
|
||||
return (<select class={styles.select} title="CmpOp" ref={select} onChange={() => setValue(select.value)}>
|
||||
<option value="Eq" default>= Equals</option>
|
||||
<option value="Neq">≠ Not equals</option>
|
||||
<option value="Lt">< Less than</option>
|
||||
<option value="Lte">≤ Less or equal</option>
|
||||
<option value="Gt">> Greater than</option>
|
||||
<option value="Gte">≥ Greater or equal</option>
|
||||
</select>);
|
||||
}
|
Loading…
Reference in new issue