Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
- je este potreba zmenit farbu klasickemu, neshrinknutemu labelu
- je potreba este dokoncit autocomplet
- zamysliet sa nad dalsimi inputmi
- spravit error message menej agresivny
  • Loading branch information
Matushl committed Nov 24, 2024
1 parent 99deb9a commit 401f929
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const FormAutocomplete = <
label={label}
variant="outlined"
fullWidth
// error={!!error}
helperText={error?.message}
focused={false}
/>
Expand Down
1 change: 1 addition & 0 deletions src/components/FormItems/FormInput/FormInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const FormInput = <
type={type}
variant="outlined"
fullWidth
error={!!error}
helperText={error?.message}
focused={false}
sx={formItemStyle}
Expand Down
60 changes: 60 additions & 0 deletions src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,66 @@ const _theme = createTheme({
},
},
},
MuiInputBase: {
styleOverrides: {
root: {
'&.Mui-error': {
backgroundColor: 'black',
'& input': {color: 'white'},
},
},
},
},
MuiOutlinedInput: {
styleOverrides: {
root: {
'&.Mui-error .MuiOutlinedInput-notchedOutline': {
borderColor: 'black',
},
},
},
},
// MuiFormControl: {
// styleOverrides: {
// root: {
// 'MuiTextField-root .MuiInputLabel-root.MuiInputLabel-shrink': {
// color: 'green',
// },
// backgroundColor: 'yellow',
// },
// },
// },
MuiTextField: {
styleOverrides: {
root: {
// Root styles for the TextField
'& .MuiInputLabel-root.MuiInputLabel-shrink': {
color: 'green', // Change label color to black
fontWeight: 700, // Set font weight to 700
padding: '2px 8px',
backgroundColor: 'white',
marginLeft: '-1px',
},
},
},
},
MuiInputLabel: {
styleOverrides: {
root: {
'&.MuiInputLabel-shrink .': {
color: 'green',
},
color: 'red',
},
},
},
MuiIconButton: {
styleOverrides: {
root: {
color: 'inherit',
},
},
},
},
})

Expand Down

0 comments on commit 401f929

Please sign in to comment.