Add unit setting
This commit is contained in:
parent
49ec5de609
commit
c6b646b94c
2 changed files with 9 additions and 0 deletions
|
|
@ -43,6 +43,11 @@
|
|||
margin: 0.2rem 0;
|
||||
}
|
||||
|
||||
label > span {
|
||||
display: inline-block;
|
||||
width: 9em;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1024px) {
|
||||
div.container {
|
||||
display: grid;
|
||||
|
|
|
|||
|
|
@ -114,6 +114,9 @@ const scene = sync({
|
|||
const input = (label: string, attrs: any) =>
|
||||
["div", {}, ["label", {}, label, ["input", attrs]]]
|
||||
|
||||
const select = (label: string, attrs: any, options: string[]) =>
|
||||
["div", {}, ["label", {}, label, ["select", attrs, ...options.map(u => ["option", {value: u}, u])]]]
|
||||
|
||||
$compile(
|
||||
["div.container", {},
|
||||
["main", {},
|
||||
|
|
@ -133,6 +136,7 @@ $compile(
|
|||
value: height.deref()!,
|
||||
oninput: $inputNum(height),
|
||||
}),
|
||||
select("Unit", { oninput: $input(unit) }, ["mm", "px"]),
|
||||
input("Grid size: ", {
|
||||
type: "number",
|
||||
min: "5",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue