From d2c2cc62a4c2e1ac10f8434bea7bb834da820869 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sat, 16 Jan 2021 11:40:36 +0100 Subject: semi working next project --- components/dialogBox.tsx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 components/dialogBox.tsx (limited to 'components/dialogBox.tsx') diff --git a/components/dialogBox.tsx b/components/dialogBox.tsx new file mode 100644 index 0000000..74fe99b --- /dev/null +++ b/components/dialogBox.tsx @@ -0,0 +1,30 @@ +import { ReactNode } from 'react'; + +import { Vierkant } from './ui'; + +import CancelIcon from '@material-ui/icons/Cancel'; + +interface DialogBoxProps { + children: ReactNode; + title: string; +} + +export function DialogBox(props: DialogBoxProps) { + return +

{props.title}

+ + {props.children} +
+} -- cgit v1.2.3 From d2f537f86890949a0d29a5b1761628ea87a9b3c9 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sun, 31 Jan 2021 14:30:02 +0100 Subject: editGameSettings dialog --- components/dialogBox.tsx | 15 ++-- components/gameSettings.tsx | 212 +++++++++++++++++++++++++------------------- pages/settings.tsx | 1 - 3 files changed, 128 insertions(+), 100 deletions(-) (limited to 'components/dialogBox.tsx') diff --git a/components/dialogBox.tsx b/components/dialogBox.tsx index 74fe99b..5ef5c3f 100644 --- a/components/dialogBox.tsx +++ b/components/dialogBox.tsx @@ -1,23 +1,25 @@ -import { ReactNode } from 'react'; +import { ReactNode, CSSProperties } from 'react'; import { Vierkant } from './ui'; import CancelIcon from '@material-ui/icons/Cancel'; -interface DialogBoxProps { +export function DialogBox(props: { children: ReactNode; title: string; -} - -export function DialogBox(props: DialogBoxProps) { + style?: CSSProperties; + onclick?: () => void; +}) { return

{props.title}

+ + {props.children}
} diff --git a/components/gameSettings.tsx b/components/gameSettings.tsx index fb5188e..c037fe3 100644 --- a/components/gameSettings.tsx +++ b/components/gameSettings.tsx @@ -1,49 +1,63 @@ -import { ReactNode, CSSProperties } from 'react'; +import { ReactNode, Component } from 'react'; import { Button, Vierkant, CheckBox, Input } from './ui'; import { DialogBox } from './dialogBox'; import BuildRoundedIcon from '@material-ui/icons/BuildRounded'; -export function CurrentGameSettings(/*props: CurrentGameSettingsProps*/) { - return
-

- Geen tijdslimiet
- Standaardregels
- Gerangschikt -

- -
; + left: 0, + transform: "translateY(-50%)" + }}> + Geen tijdslimiet
+ Standaardregels
+ Gerangschikt +

+ + + ; + } } function GameSettingsSection(props: { @@ -73,62 +87,74 @@ function GameSettingsSection(props: { } -function GameRule(props: { - title: string; - description: string; - style?: CSSProperties; -}) { - return
*/ +/*

{props.title}

*/ +/*

{props.description}

*/ +/*
; */ +/* } */ + +/* + +
-

{props.title}

-

{props.description}

-
; -} + + + + + +
+*/ -export function EditGameSettings() { - return -
- -
- - - -
- - Timer gebruiken voor bijde spelers -
- -
- - -
- - -
- -
-
; +export class EditGameSettings extends Component<{ + parentState: { editGameRulesDialogVisible: boolean; }; + hideEditGameRules: () => void; +}> { + + render () { + return +
+ +
+ + + +
+ + Timer gebruiken voor bijde spelers +
+ +
+
; + } } diff --git a/pages/settings.tsx b/pages/settings.tsx index 2daa90b..6bb7c46 100644 --- a/pages/settings.tsx +++ b/pages/settings.tsx @@ -26,7 +26,6 @@ export default function SettingsPage() {

Standaard spelregels

- ); -- cgit v1.2.3