@@ -21,7 +21,7 @@ import NERFormModal from '../../../../components/NERFormModal';
2121import * as yup from 'yup' ;
2222import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline' ;
2323import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline' ;
24- import Markdown from 'react-markdown ' ;
24+ import NERMarkdown from '../../../../components/NERMarkdown ' ;
2525
2626interface CreateChecklistModalProps {
2727 open : boolean ;
@@ -147,6 +147,7 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
147147 onFormSubmit = { onFormSubmit }
148148 formId = { 'create-task-form' }
149149 showCloseButton
150+ paperProps = { { maxWidth : '80vw' } }
150151 >
151152 < Box sx = { { display : 'flex' , flexDirection : 'column' , gap : 3 } } >
152153 < FormControl fullWidth >
@@ -277,7 +278,7 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
277278 < Box
278279 sx = { {
279280 display : 'flex' ,
280- minWidth : '600px ' ,
281+ width : '30vw ' ,
281282 alignItems : 'stretch'
282283 } }
283284 >
@@ -288,7 +289,7 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
288289 render = { ( { field } ) => (
289290 < TextField
290291 { ...field }
291- placeholder = "Enter description..."
292+ placeholder = "Enter description markdown ..."
292293 fullWidth
293294 multiline
294295 variant = "outlined"
@@ -328,7 +329,7 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
328329 sx = { {
329330 backgroundColor : theme . palette . background . paper ,
330331 borderRadius : 3 ,
331- minWidth : '600px ' ,
332+ width : '30vw ' ,
332333 padding : 2 ,
333334 display : 'flex' ,
334335 flexDirection : 'column' ,
@@ -354,42 +355,11 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
354355 < Box
355356 sx = { {
356357 flex : 1 ,
357- overflow : 'auto' ,
358- wordBreak : 'break-word' ,
359- whiteSpace : 'pre-wrap' ,
360- fontSize : '1.1rem' ,
361- lineHeight : 1.6 ,
362- '& h1, & h2, & h3, & h4, & h5, & h6' : {
363- margin : '0.5em 0 0.25em 0' ,
364- color : theme . palette . text . primary
365- } ,
366- '& p' : {
367- margin : '0.25em 0' ,
368- color : theme . palette . text . primary
369- } ,
370- '& ul, & ol' : {
371- margin : '0.25em 0' ,
372- paddingLeft : '1.5em'
373- } ,
374- '& li' : {
375- margin : '0.1em 0'
376- } ,
377- '& code' : {
378- backgroundColor : theme . palette . action . hover ,
379- padding : '2px 4px' ,
380- borderRadius : 1 ,
381- fontSize : '0.95em'
382- } ,
383- '& pre' : {
384- backgroundColor : theme . palette . action . hover ,
385- padding : 1 ,
386- borderRadius : 1 ,
387- overflow : 'auto'
388- }
358+ overflow : 'auto'
389359 } }
390360 >
391361 { watch ( `descriptions.${ index } .name` ) ? (
392- < Markdown > { watch ( `descriptions.${ index } .name` ) } </ Markdown >
362+ < NERMarkdown markdown = { watch ( `descriptions.${ index } .name` ) } / >
393363 ) : (
394364 < Typography
395365 variant = "body2"
@@ -398,7 +368,7 @@ const CreateChecklistModal = ({ open, handleClose, teamId, teamTypeId }: CreateC
398368 fontStyle : 'italic'
399369 } }
400370 >
401- Start typing to see preview ...
371+ Start typing to see formatted markdown ...
402372 </ Typography >
403373 ) }
404374 </ Box >
0 commit comments