Added is vehicle checkbox and vehicle type tokens

This commit is contained in:
Mitchell McCaffrey
2020-05-22 20:43:07 +10:00
parent 00c24c34a4
commit a8bd5ab672
7 changed files with 149 additions and 31 deletions
+14 -2
View File
@@ -1,5 +1,5 @@
import React from "react";
import { Flex, Box, Input, IconButton, Label } from "theme-ui";
import { Flex, Box, Input, IconButton, Label, Checkbox } from "theme-ui";
import ExpandMoreIcon from "../../icons/ExpandMoreIcon";
@@ -29,7 +29,7 @@ function TokenSettings({
</Flex>
{showMore && (
<>
<Box my={2} sx={{ flexGrow: 1 }}>
<Box mt={2} sx={{ flexGrow: 1 }}>
<Label htmlFor="name">Name</Label>
<Input
name="name"
@@ -39,6 +39,18 @@ function TokenSettings({
my={1}
/>
</Box>
<Box my={2}>
<Label>
<Checkbox
checked={token && token.isVehicle}
disabled={!token || token.type === "default"}
onChange={(e) =>
onSettingsChange("isVehicle", e.target.checked)
}
/>
Vehicle / Mount
</Label>
</Box>
</>
)}
<IconButton