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 d08e2cb commit 1c06aee
Show file tree
Hide file tree
Showing 3 changed files with 55 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 @@ -29,6 +29,7 @@ export const FormInput = <
type={type}
variant="outlined"
fullWidth
error={!!error}
helperText={error?.message}
focused={false}
sx={formItemStyle}
Expand Down
53 changes: 53 additions & 0 deletions src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,59 @@ 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: {
Expand Down

0 comments on commit 1c06aee

Please sign in to comment.