diff --git a/docs/FileInput.md b/docs/FileInput.md index c4eaa8c9f03..e95e9458680 100644 --- a/docs/FileInput.md +++ b/docs/FileInput.md @@ -124,7 +124,6 @@ The `` component accepts the usual `className` prop. You can also ove | Rule name | Description | |-------------------------------|----------------------------------------------------------------------------| | `& .RaFileInput-dropZone` | Applied to the main container of the component | -| `& .RaFileInput-preview` | Applied to each children | | `& .RaFileInput-removeButton` | Applied to each of the MUI's `IconButton` component used as remove button | To override the style of all instances of `` using the [MUI style overrides](https://mui.com/customization/globals/#css), use the `RaFileInput` key. diff --git a/docs/ImageInput.md b/docs/ImageInput.md index e138b649ae7..a0b691c7a9d 100644 --- a/docs/ImageInput.md +++ b/docs/ImageInput.md @@ -59,8 +59,7 @@ The `` component accepts the usual `className` prop. You can also ov | Rule name | Description | |---------------------------------|-----------------------------------------------------| -| `& .RaImageInput-dropZone` | Styles pass to the underlying `FileInput` component | -| `& .RaImageInput-preview` | Styles pass to the underlying `FileInput` component | -| `& .RaImageInput-removeButton` | Styles pass to the underlying `FileInput` component | +| `& .RaFileInput-dropZone` | Styles pass to the underlying `FileInput` component | +| `& .RaFileInput-removeButton` | Styles pass to the underlying `FileInput` component | To override the style of all instances of `` using the [MUI style overrides](https://mui.com/customization/globals/#css), use the `RaImageInput` key. diff --git a/packages/ra-ui-materialui/src/input/FileInput.tsx b/packages/ra-ui-materialui/src/input/FileInput.tsx index 7964430ba30..7bb6669ac72 100644 --- a/packages/ra-ui-materialui/src/input/FileInput.tsx +++ b/packages/ra-ui-materialui/src/input/FileInput.tsx @@ -231,7 +231,6 @@ const PREFIX = 'RaFileInput'; export const FileInputClasses = { dropZone: `${PREFIX}-dropZone`, - preview: `${PREFIX}-preview`, removeButton: `${PREFIX}-removeButton`, }; @@ -249,7 +248,6 @@ const StyledLabeled = styled(Labeled, { textAlign: 'center', color: theme.palette.getContrastText(theme.palette.background.default), }, - [`& .${FileInputClasses.preview}`]: {}, [`& .${FileInputClasses.removeButton}`]: {}, })); diff --git a/packages/ra-ui-materialui/src/input/ImageInput.tsx b/packages/ra-ui-materialui/src/input/ImageInput.tsx index f082585209d..c5e39d7d8ae 100644 --- a/packages/ra-ui-materialui/src/input/ImageInput.tsx +++ b/packages/ra-ui-materialui/src/input/ImageInput.tsx @@ -29,11 +29,6 @@ const StyledFileInput = styled(FileInput, { textAlign: 'center', color: theme.palette.getContrastText(theme.palette.background.default), }, - - [`& .${FileInputClasses.preview}`]: { - display: 'inline-block', - }, - [`& .${FileInputClasses.removeButton}`]: { display: 'inline-block', position: 'relative',