sticky dialog title

This commit is contained in:
Vinzenz Schroeter 2024-05-07 13:41:10 +02:00
parent bacd1777be
commit 59459019fc
2 changed files with 9 additions and 7 deletions

View file

@ -10,11 +10,13 @@ export default function Dialog({children, className, title, onClose}: {
className?: string;
onClose?: () => void;
}) {
return <Column className={'Dialog overflow-scroll ' + (className ?? '')}>
return <Column className={'Dialog ' + (className ?? '')}>
<Row>
<h3 className='flex-grow'>{title}</h3>
{onClose && <Button text='x' onClick={onClose} />}
<h3 className="flex-grow">{title}</h3>
{onClose && <Button text="x" onClick={onClose}/>}
</Row>
{children}
</Column>
<Column className='overflow-scroll'>
{children}
</Column>
</Column>;
}

View file

@ -5,7 +5,7 @@ export function TextInput( {onChange, className, value, placeholder, onEnter }:
onChange?: ChangeEventHandler<HTMLInputElement> | undefined;
className?: string;
value: string;
placeholder: string;
placeholder?: string;
onEnter?: () => void;
}) {
return <input
@ -25,7 +25,7 @@ export function NumberInput( {onChange, className, value, placeholder, onEnter }
onChange?: ChangeEventHandler<HTMLInputElement> | undefined;
className?: string;
value: number;
placeholder: string;
placeholder?: string;
onEnter?: () => void;
}) {
return <input