extract dialog component
This commit is contained in:
parent
5fc21494ef
commit
a952d4227d
4 changed files with 31 additions and 17 deletions
13
tank-frontend/src/components/Dialog.css
Normal file
13
tank-frontend/src/components/Dialog.css
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
.Dialog {
|
||||
border: solid var(--border-size-thick) var(--color-secondary);
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
background: var(--color-background);
|
||||
|
||||
gap: 16px;
|
||||
padding: 16px;
|
||||
}
|
12
tank-frontend/src/components/Dialog.tsx
Normal file
12
tank-frontend/src/components/Dialog.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import {ReactNode} from 'react';
|
||||
import Column from './Column.tsx';
|
||||
import './Dialog.css';
|
||||
|
||||
export default function Dialog({children, className}: {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
}) {
|
||||
return <Column className={'Dialog ' + className ?? ''}>
|
||||
{children}
|
||||
</Column>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue