import { Component, CSSProperties, ReactNode, useEffect, useState } from 'react'; import CheckBoxIcon from '@material-ui/icons/CheckBox'; import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; import EditOutlinedIcon from '@material-ui/icons/EditOutlined'; import SearchIcon from '@material-ui/icons/Search'; export function Vierkant(props: { href?: string; width?: string; height?: string; children?: ReactNode; className?: string; id?: string; onclick?: () => void; }) { return {props.children} ; } export function Button(props: { text?: string; children?: ReactNode; style?: CSSProperties; href?: string; className?: string; onclick?: (() => void); id?: string; }) { return {props.text ? {props.text} : undefined} {props.children} ; } export function IconLabelButton(props: { text: string; icon: ReactNode; onclick?: () => void; style?: CSSProperties; href?: string; }) { return ; } export function Input(props: { label?: string; style?: CSSProperties; type?: string; id?: string; min?: number; max?: number; value?: string | number; dark?: boolean; autocomplete?: string; autofocus?: boolean; className?: string; }) { return ; } export function SearchBar(props: { label?: string; }) { return
; } export function CheckBox(props: { state?: boolean; style?: CSSProperties; id?: string; onclick?: (state: boolean) => void; }) { var [gotDefaultState, setGotDefaultState] = useState(false); var [on, setOn] = useState(props.state); useEffect(() => { if (gotDefaultState) return; setOn(props.state); if (typeof props.state !== 'undefined') setGotDefaultState(true); }); var toggle = () => { setOn(!on); props.onclick && props.onclick(!on); }; return
{on ? : }
; } export class ColorPicker extends Component<{ style?: CSSProperties; }> { state: { color: string; dark: boolean; } = { color: '#012345', dark: true, }; render() { return ; } } export function Tuitje(props: { style?: CSSProperties; rotation?: number; }) { return ; } export function Bubble(props: { children?: ReactNode; style?: CSSProperties; tuitjeStyle?: CSSProperties; }) { return {props.children} ; }