You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
34 lines
1.1 KiB
import React from "react";
|
|
import Dialog from "@material-ui/core/Dialog";
|
|
import Draggable from "react-draggable";
|
|
import {Paper} from "@material-ui/core";
|
|
import {MyDialogProps} from "../entity";
|
|
import {CloseDialog} from "./CloseDialog";
|
|
|
|
/**
|
|
* 我的弹窗
|
|
*/
|
|
export class MyDialog extends React.Component<MyDialogProps, { undefined?:undefined }>{
|
|
|
|
|
|
render() {
|
|
return (
|
|
<Dialog
|
|
hideBackdrop={true}
|
|
open={this.props.open}
|
|
PaperComponent={(props)=>
|
|
<Draggable handle={"#"+this.props.titleId} cancel={'[class*="MuiDialogContent-root"]'}>
|
|
<Paper {...props} />
|
|
</Draggable>}
|
|
aria-labelledby={this.props.titleId}
|
|
classes={{paper:"w-100"}}
|
|
>
|
|
<CloseDialog menuName={this.props.menuName} onClose={()=>this.props.onClose()} titleId={this.props.titleId}/>
|
|
|
|
<div className="p-3">
|
|
{this.props.content}
|
|
</div>
|
|
</Dialog>
|
|
);
|
|
}
|
|
}
|
|
|