-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): add ability to display infobox in plugin playground (#1351)
- Loading branch information
1 parent
ea80389
commit 1e41e1c
Showing
7 changed files
with
183 additions
and
84 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
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
49 changes: 49 additions & 0 deletions
49
web/src/beta/features/PluginPlayground/SettingsList/index.tsx
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { CheckBox, Typography } from "@reearth/beta/lib/reearth-ui"; | ||
import { styled } from "@reearth/services/theme"; | ||
import { FC } from "react"; | ||
|
||
type Props = { | ||
infoboxEnabled: boolean; | ||
setInfoboxEnabled: (infoBoxEnabled: boolean) => void; | ||
}; | ||
const SettingsList: FC<Props> = ({ infoboxEnabled, setInfoboxEnabled }) => { | ||
return ( | ||
<Wrapper> | ||
<Row> | ||
<CheckBox | ||
value={infoboxEnabled} | ||
onChange={() => setInfoboxEnabled(!infoboxEnabled)} | ||
/> | ||
<Typography size="body" otherProperties={{ paddingLeft: 4 }}> | ||
Enable Infobox | ||
</Typography> | ||
</Row> | ||
{/* <Row> | ||
<CheckBox /> | ||
<Typography size="body" otherProperties={{ paddingLeft: 4 }}> | ||
Enable Story Panel | ||
</Typography> | ||
</Row> */} | ||
</Wrapper> | ||
); | ||
}; | ||
|
||
const Wrapper = styled.div(({ theme }) => ({ | ||
display: "flex", | ||
flexDirection: "column", | ||
overflow: "auto", | ||
padding: theme.spacing.smallest | ||
})); | ||
|
||
const Row = styled.div(({ theme }) => ({ | ||
display: "flex", | ||
alignItems: "center", | ||
padding: theme.spacing.smallest, | ||
"&:hover": { | ||
backgroundColor: theme.bg[1] | ||
}, | ||
borderRadius: theme.radius.small, | ||
minHeight: 28 | ||
})); | ||
|
||
export default SettingsList; |
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
Oops, something went wrong.