diff --git a/frontend/src/Components/ComponentUtils/MultiUpload/DescriptionInput.js b/frontend/src/Components/ComponentUtils/MultiUpload/DescriptionInput.js index 0d9c80b..dcd52d7 100644 --- a/frontend/src/Components/ComponentUtils/MultiUpload/DescriptionInput.js +++ b/frontend/src/Components/ComponentUtils/MultiUpload/DescriptionInput.js @@ -1,73 +1,10 @@ import React from 'react'; -import { makeStyles } from '@mui/styles'; import { TextField, Typography, Grid, Box } from '@mui/material'; -const useStyles = makeStyles({ - container: { - marginTop: '20px', - marginBottom: '20px' - }, - sectionTitle: { - fontFamily: 'roboto', - fontSize: '18px', - color: '#333333', - marginBottom: '15px', - display: 'block', - fontWeight: '500' - }, - fieldLabel: { - fontFamily: 'roboto', - fontSize: '14px', - color: '#555555', - marginBottom: '8px', - display: 'block' - }, - textField: { - width: '100%', - marginBottom: '15px', - '& .MuiOutlinedInput-root': { - borderRadius: '8px' - } - }, - requiredField: { - '& .MuiOutlinedInput-root': { - borderRadius: '8px', - '& fieldset': { - borderColor: '#E57373' - } - } - }, - optionalField: { - '& .MuiOutlinedInput-root': { - borderRadius: '8px', - '& fieldset': { - borderColor: '#E0E0E0' - } - } - }, - characterCount: { - fontSize: '12px', - color: '#999999', - textAlign: 'right', - marginTop: '-10px', - marginBottom: '10px' - }, - requiredIndicator: { - color: '#E57373', - fontSize: '16px' - }, - optionalIndicator: { - color: '#9E9E9E', - fontSize: '12px', - fontStyle: 'italic' - } -}); - function DescriptionInput({ metadata = {}, onMetadataChange }) { - const classes = useStyles(); const handleFieldChange = (field, value) => { const updatedMetadata = { @@ -79,19 +16,71 @@ function DescriptionInput({ const currentYear = new Date().getFullYear(); + const fieldLabelSx = { + fontFamily: 'roboto', + fontSize: '14px', + color: '#555555', + marginBottom: '8px', + display: 'block' + }; + + const sectionTitleSx = { + fontFamily: 'roboto', + fontSize: '18px', + color: '#333333', + marginBottom: '15px', + display: 'block', + fontWeight: 500 + }; + + const textFieldSx = { + width: '100%', + marginBottom: '15px', + '& .MuiOutlinedInput-root': { + borderRadius: '8px' + } + }; + + const requiredFieldSx = { + '& .MuiOutlinedInput-root': { + borderRadius: '8px', + '& fieldset': { + borderColor: '#E57373' + } + } + }; + + const optionalFieldSx = { + '& .MuiOutlinedInput-root': { + borderRadius: '8px', + '& fieldset': { + borderColor: '#E0E0E0' + } + } + }; + + const characterCountSx = { + fontSize: '12px', + color: '#999999', + textAlign: 'right', + marginTop: '-10px', + marginBottom: '10px' + }; + + const requiredIndicatorSx = { color: '#E57373', fontSize: '16px' }; + const optionalIndicatorSx = { color: '#9E9E9E', fontSize: '12px', fontStyle: 'italic' }; + return ( -
- - 📝 Projekt-Informationen - - + + 📝 Projekt-Informationen + - - Jahr * + + Jahr * - - Titel * + + Titel * handleFieldChange('title', e.target.value)} placeholder="z.B. Wohnzimmer Renovierung" - inputProps={{ - maxLength: 100 - }} + inputProps={{ maxLength: 100 }} /> - - Beschreibung (optional) + + Beschreibung (optional) handleFieldChange('description', e.target.value)} placeholder="Detaillierte Beschreibung des Projekts..." - inputProps={{ - maxLength: 500 - }} + inputProps={{ maxLength: 500 }} /> -
- {(metadata.description || '').length} / 500 Zeichen -
+ {(metadata.description || '').length} / 500 Zeichen
- - Name/Ersteller (optional) + + Name/Ersteller (optional) handleFieldChange('name', e.target.value)} placeholder="Dein Name oder Projektersteller" - inputProps={{ - maxLength: 50 - }} + inputProps={{ maxLength: 50 }} />
-
+ ); }