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.
 
 
 
 
help_admin/src/ui/MyDialog.tsx

38 lines
1.2 KiB

import React from "react";
import Dialog from "@material-ui/core/Dialog";
import Draggable from "react-draggable";
import {Paper, styled, withWidth} from "@material-ui/core";
import {MyDialogProps} from "../entity";
import {CloseDialog} from "./CloseDialog";
const EditDialogPaper=styled(Paper)({
maxWidth:1000
})
/**
* 我的弹窗
*/
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"]'}>
<EditDialogPaper {...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>
);
}
}