-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change markdown lib and add seatbelt report to create by params
- Loading branch information
Showing
8 changed files
with
584 additions
and
1,468 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Box } from '@mui/system'; | ||
import React, { useRef } from 'react'; | ||
|
||
import { BasicModal } from '../../ui'; | ||
import { MarkdownContainer } from '../../ui/components/MarkdownContainer'; | ||
|
||
interface SeatBeltReportModalProps { | ||
isOpen: boolean; | ||
setIsOpen: (value: boolean) => void; | ||
report?: string; | ||
} | ||
|
||
export function SeatBeltReportModal({ | ||
isOpen, | ||
setIsOpen, | ||
report, | ||
}: SeatBeltReportModalProps) { | ||
const initialFocusRef = useRef(null); | ||
|
||
if (!report) return null; | ||
|
||
return ( | ||
<BasicModal | ||
maxWidth={980} | ||
initialFocus={initialFocusRef} | ||
isOpen={isOpen} | ||
setIsOpen={setIsOpen} | ||
withCloseButton> | ||
<Box sx={{ typography: 'h1', mb: 24 }}>Seatbelt Report</Box> | ||
|
||
<MarkdownContainer markdown={report} /> | ||
</BasicModal> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.