Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remove useless RaFileInput-preview and RaImageInput-preview classnames #8066

Merged
merged 2 commits into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/FileInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ The `<FileInput>` 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 `<FileInput>` using the [MUI style overrides](https://mui.com/customization/globals/#css), use the `RaFileInput` key.
5 changes: 2 additions & 3 deletions docs/ImageInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ The `<ImageInput>` 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 `<ImageInput>` using the [MUI style overrides](https://mui.com/customization/globals/#css), use the `RaImageInput` key.
2 changes: 0 additions & 2 deletions packages/ra-ui-materialui/src/input/FileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ const PREFIX = 'RaFileInput';

export const FileInputClasses = {
dropZone: `${PREFIX}-dropZone`,
preview: `${PREFIX}-preview`,
removeButton: `${PREFIX}-removeButton`,
};

Expand All @@ -249,7 +248,6 @@ const StyledLabeled = styled(Labeled, {
textAlign: 'center',
color: theme.palette.getContrastText(theme.palette.background.default),
},
[`& .${FileInputClasses.preview}`]: {},
[`& .${FileInputClasses.removeButton}`]: {},
}));

Expand Down
5 changes: 0 additions & 5 deletions packages/ra-ui-materialui/src/input/ImageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down