diff --git a/src/client/components/ResultPage/RiskElement.tsx b/src/client/components/ResultPage/RiskElement.tsx new file mode 100644 index 0000000..355a185 --- /dev/null +++ b/src/client/components/ResultPage/RiskElement.tsx @@ -0,0 +1,57 @@ +import React from 'react' +import { Box, Grid, Typography } from '@mui/material' +import Markdown from '../Common/Markdown' + +export interface RiskElementProps { + // eslint-disable-next-line react/require-default-props + infoText?: string + resultText: string + risk: number +} + +const RiskElement = ({ infoText, resultText, risk }: RiskElementProps) => { + const colors: any = { + 1: '#2ecc71', + 2: '#f1c40f', + 3: '#e74c3c', + } + return ( + + + + + {resultText} + + + + + {risk} + + + + {infoText && ( + + {infoText} + + )} + + ) +} + +export default RiskElement