From 30dbc5c5cba2cd8240d9547e625a640db6b8eb4e Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 2 Feb 2021 16:59:18 +0100 Subject: added ui id's and checkbox state class --- components/gameSettings.tsx | 19 ++++++++++++------- components/ui.tsx | 21 ++++++++++++--------- 2 files changed, 24 insertions(+), 16 deletions(-) (limited to 'components') 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 {props.title} - { overflowY: "scroll", borderRadius: 8, }}> - +
- - - + + +
{ marginLeft: 4 }}>Timer gebruiken voor bijde spelers
- + + ; } } diff --git a/components/ui.tsx b/components/ui.tsx index 492bab7..a0c34a4 100644 --- a/components/ui.tsx +++ b/components/ui.tsx @@ -10,8 +10,9 @@ export function Vierkant(props: { height?: string; style?: CSSProperties; children?: ReactNode; - className?: string; }) -{ + className?: string; + id?: string; +}) { return {props.children} + }} href={props.href} className={props.className} id={props.id}>{props.children} } export function Button(props: { @@ -32,9 +33,10 @@ export function Button(props: { children?: ReactNode; style?: CSSProperties; href?: string; - onclick?: (() => void); }) -{ - return void); + id?: string; +}) { + return { state = { on: this.props.state || false } public toggle = () => this.setState({ on: !this.state.on }) render() { - return