@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
17 lines (16 loc) • 1.36 kB
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Button, Typography } from '@mui/material';
import BaseDialog from '../../shared/BaseDialog';
import { FormattedMessage } from 'react-intl';
import { memo, useCallback } from 'react';
function CoursePublicationDialog(props) {
// PROPS
const { onSubmit, onClose } = props;
// HANDLERS
const handleSubmit = useCallback(() => {
onSubmit();
onClose();
}, [onSubmit, onClose]);
return (_jsx(BaseDialog, Object.assign({ open: true, DialogContentProps: { dividers: false }, onClose: onClose, title: _jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.dialog.title", defaultMessage: "ui.courseForm.edit.dialog.title" }) })), actions: _jsx(Button, Object.assign({ size: "small", color: "primary", variant: "contained", onClick: handleSubmit }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.dialog.btn", defaultMessage: "ui.courseForm.edit.dialog.btn" }) })) })) }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.courseForm.edit.dialog.description", defaultMessage: "ui.courseForm.edit.dialog.description" }) })) })));
}
export default memo(CoursePublicationDialog);