Skip to content

Commit

Permalink
Note about how user input is handled added
Browse files Browse the repository at this point in the history
  • Loading branch information
Catrovitch committed Aug 29, 2024
1 parent 21a7844 commit 033c147
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions src/client/pages/InventorsAssistant/StepZero.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import React, { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Box, Button, Typography } from '@mui/material'
import { Alert, Box, Button, Typography } from '@mui/material'

import SectionHeading from '../../components/Common/SectionHeading'

Expand All @@ -11,7 +11,7 @@ interface StepZeroProps {

const StepZero: React.FC<StepZeroProps> = ({ currentStep, setCurrentStep }) => {
const { t } = useTranslation()

const [showDetails, setShowDetails] = useState(false)
return (
<Box
component='section'
Expand All @@ -23,6 +23,35 @@ const StepZero: React.FC<StepZeroProps> = ({ currentStep, setCurrentStep }) => {
<Typography component='p' variant='body1'>
{t('inventorsAssistant:mainContent')}
</Typography>
<Box
component='section'
sx={{ maxWidth: '1024px', mx: 'auto', my: 4, p: { xs: 2, md: 0 } }}
>
<Alert severity='info'>
<Typography component='p' variant='body1' sx={{ fontWeight: 'bold' }}>
{t('inventorsAssistant:ImportantInfoUserInput')}
</Typography>
<Typography
variant='body2'
onClick={() => setShowDetails(!showDetails)}
sx={{
cursor: 'pointer',
color: 'text.secondary',
mt: 2,
mb: showDetails ? 2 : 0,
textDecoration: showDetails ? 'underline' : 'none',
}}
>
{showDetails ? 'Hide Details' : 'Show Details'}
</Typography>

{showDetails && (
<Typography component='p' variant='body1'>
{t('inventorsAssistant:ImportantInfoUserInputLong')}
</Typography>
)}
</Alert>
</Box>

{currentStep === 0 && (
<Box
Expand Down

0 comments on commit 033c147

Please sign in to comment.