mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-08 09:24:18 +01:00
25 lines
No EOL
787 B
TypeScript
25 lines
No EOL
787 B
TypeScript
import React from "react";
|
|
import Window, {WindowProps} from "ui/components/Window";
|
|
import cx from 'classnames';
|
|
import ButtonGroup from "ui/components/controls/ButtonGroup";
|
|
import Button from "ui/components/controls/Button";
|
|
|
|
export function Dialog({children, className, onOK, ...props}: WindowProps & {
|
|
onOK: () => void
|
|
}) {
|
|
|
|
return <Window className={cx(className, 'dialog')}
|
|
footer={
|
|
<ButtonGroup className='dialog-buttons padded'>
|
|
<Button onClick={props.onClose}>Cancel</Button>
|
|
<Button type='accent' onClick={onOK}>OK</Button>
|
|
</ButtonGroup>
|
|
}
|
|
{...props} >
|
|
|
|
<div className='dialog-content padded'>
|
|
{children}
|
|
</div>
|
|
|
|
</Window>
|
|
} |