diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-02-02 16:59:18 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-02-02 16:59:18 +0100 |
commit | 30dbc5c5cba2cd8240d9547e625a640db6b8eb4e (patch) | |
tree | 8815c6130acd9dd8a61e9a636d85f22fdc7b552a /components/gameSettings.tsx | |
parent | 1e415fe064cde08e2fdae55ac3846d60d492a700 (diff) |
added ui id's and checkbox state class
Diffstat (limited to 'components/gameSettings.tsx')
-rw-r--r-- | components/gameSettings.tsx | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/components/gameSettings.tsx b/components/gameSettings.tsx index 15e3591..b89f429 100644 --- a/components/gameSettings.tsx +++ b/components/gameSettings.tsx @@ -65,8 +65,9 @@ function GameSettingsSection(props: { title: string; state: boolean; noMarginBottom?: boolean; + id: string; }) { - return <Vierkant style={{ + return <Vierkant id={props.id} style={{ backgroundColor: "var(--background-alt)", width: "100%", padding: 16, @@ -78,7 +79,7 @@ function GameSettingsSection(props: { fontSize: 14, fontWeight: 600 }}>{props.title}</span> - <CheckBox state={props.state} style={{ + <CheckBox state={props.state} id={`${props.id}_enabled`} style={{ verticalAlign: "top", float: "right", margin: -3 @@ -141,16 +142,16 @@ export class EditGameSettings extends Component<editGameSettingsProps> { overflowY: "scroll", borderRadius: 8, }}> - <GameSettingsSection title="Tijdslimiet" state={false}> + <GameSettingsSection title="Tijdslimiet" state={false} id="timelimit"> <div style={{ display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gridGap: 16, margin: "16px 0" }}> - <Input type="number" label="min" min={0} max={60}/> - <Input type="number" label="sec" min={0} max={60}/> - <Input type="number" label="plus" min={0}/> + <Input id="timelimit_minutes" type="number" label="min" min={0} max={60}/> + <Input id="timelimit_seconds" type="number" label="sec" min={0} max={60}/> + <Input id="timelimit_addmove" type="number" label="plus" min={0}/> </div> <CheckBox state={false}/> <span style={{ @@ -158,8 +159,12 @@ export class EditGameSettings extends Component<editGameSettingsProps> { marginLeft: 4 }}>Timer gebruiken voor bijde spelers</span> </GameSettingsSection> - <GameSettingsSection title="Gerangschikt spel" state={true} noMarginBottom/> + <GameSettingsSection title="Gerangschikt spel" state={true} id="ranked" noMarginBottom/> </div> + <Button style={{ + textAlign: "center", + marginTop: 24 + }}>Instellingen opslaan</Button> </DialogBox>; } } |