feedback panel(not centered on screen)

This commit is contained in:
aurinex
2025-07-07 21:01:46 +05:00
parent 7bbdedf6ef
commit eb6cc40f22
9 changed files with 1424 additions and 162 deletions

46
src/pages/MainPage.tsx Normal file
View File

@ -0,0 +1,46 @@
import React, { useState } from 'react'
import { Button, Container, Box, Typography } from '@mui/material'
import Feedback from '../components/Feedback'
function MainPage() {
const [feedbackOpen, setFeedbackOpen] = useState(false);
const handleOpenFeedback = () => {
setFeedbackOpen(true);
};
const handleCloseFeedback = () => {
setFeedbackOpen(false);
};
return (
<Container maxWidth="xl">
<Box sx={{ mt: 4, textAlign: 'center' }}>
<Typography variant="h3" component="h1" gutterBottom>
Главная страница
</Typography>
<Typography variant="body1" paragraph>
Это главная страница приложения
</Typography>
<Button
variant="contained"
onClick={handleOpenFeedback}
sx={{
bgcolor: '#c22d1a',
color: 'white',
py: 1.5,
px: 3,
'&:hover': { bgcolor: '#a42517' }
}}
>
Оставить заявку
</Button>
</Box>
<Feedback open={feedbackOpen} onClose={handleCloseFeedback} />
</Container>
)
}
export default MainPage