-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump version * refactor to include typescript.types exported
- Loading branch information
Ryan Sites
authored
Jun 2, 2021
1 parent
baec883
commit a074508
Showing
18 changed files
with
1,537 additions
and
1,525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
import * as React from "react"; | ||
import { Flex, FormLabel, Stack, Select } from "@chakra-ui/react"; | ||
|
||
import { AdvancedItemStateProps } from "../JsonSchemaEditor.types"; | ||
import { AdvancedItemStateProps } from "../../JsonSchemaEditor.types"; | ||
import { useState } from "@hookstate/core"; | ||
|
||
export const AdvancedBoolean: React.FunctionComponent<AdvancedItemStateProps> = ( | ||
props: React.PropsWithChildren<AdvancedItemStateProps> | ||
props: React.PropsWithChildren<AdvancedItemStateProps> | ||
) => { | ||
const { itemStateProp } = props; | ||
const { itemStateProp } = props; | ||
|
||
const item = useState(itemStateProp); | ||
const item = useState(itemStateProp); | ||
|
||
return ( | ||
<Flex direction="column" wrap="nowrap"> | ||
<Stack | ||
isInline | ||
alignItems="center" | ||
justifyContent="center" | ||
alignContent="center" | ||
m={1} | ||
> | ||
<FormLabel mr={2} htmlFor="default"> | ||
Default:{" "} | ||
</FormLabel> | ||
<Select | ||
variant="outline" | ||
value={(item.default.value as string) ?? ""} | ||
size="sm" | ||
margin={2} | ||
placeholder="Choose data type" | ||
onChange={(evt: React.ChangeEvent<HTMLSelectElement>) => { | ||
item.default.set(evt.target.value); | ||
}} | ||
> | ||
<option key="true" value="true"> | ||
true | ||
</option> | ||
<option key="false" value="false"> | ||
false | ||
</option> | ||
</Select> | ||
</Stack> | ||
</Flex> | ||
); | ||
return ( | ||
<Flex direction="column" wrap="nowrap"> | ||
<Stack | ||
isInline | ||
alignItems="center" | ||
justifyContent="center" | ||
alignContent="center" | ||
m={1} | ||
> | ||
<FormLabel mr={2} htmlFor="default"> | ||
Default:{" "} | ||
</FormLabel> | ||
<Select | ||
variant="outline" | ||
value={(item.default.value as string) ?? ""} | ||
size="sm" | ||
margin={2} | ||
placeholder="Choose data type" | ||
onChange={(evt: React.ChangeEvent<HTMLSelectElement>) => { | ||
item.default.set(evt.target.value); | ||
}} | ||
> | ||
<option key="true" value="true"> | ||
true | ||
</option> | ||
<option key="false" value="false"> | ||
false | ||
</option> | ||
</Select> | ||
</Stack> | ||
</Flex> | ||
); | ||
}; |
Oops, something went wrong.