diff --git a/packages/ra-core/src/form/FormField.tsx b/packages/ra-core/src/form/FormField.tsx index f424a8b17bc..fe0b3f25ed3 100644 --- a/packages/ra-core/src/form/FormField.tsx +++ b/packages/ra-core/src/form/FormField.tsx @@ -24,7 +24,7 @@ interface Props validate?: Validator | Validator[]; } -export const FormField: FunctionComponent = ({ +const FormField: FunctionComponent = ({ id, input, validate, diff --git a/packages/ra-ui-materialui/src/detail/SimpleShowLayout.js b/packages/ra-ui-materialui/src/detail/SimpleShowLayout.js index fd35c7f27d3..1aee01dd0cd 100644 --- a/packages/ra-ui-materialui/src/detail/SimpleShowLayout.js +++ b/packages/ra-ui-materialui/src/detail/SimpleShowLayout.js @@ -49,7 +49,7 @@ const sanitizeRestProps = ({ * ); * export default App; */ -export const SimpleShowLayout = ({ +const SimpleShowLayout = ({ basePath, className, children, diff --git a/packages/ra-ui-materialui/src/field/FileField.spec.js b/packages/ra-ui-materialui/src/field/FileField.spec.js index e017ab7a588..406aa0f9c7c 100644 --- a/packages/ra-ui-materialui/src/field/FileField.spec.js +++ b/packages/ra-ui-materialui/src/field/FileField.spec.js @@ -1,6 +1,6 @@ import React from 'react'; import expect from 'expect'; -import { FileField } from './FileField'; +import FileField from './FileField'; import { render, cleanup } from '@testing-library/react'; const defaultProps = { diff --git a/packages/ra-ui-materialui/src/field/FileField.tsx b/packages/ra-ui-materialui/src/field/FileField.tsx index dde47b6a636..0e37eb3a1b0 100644 --- a/packages/ra-ui-materialui/src/field/FileField.tsx +++ b/packages/ra-ui-materialui/src/field/FileField.tsx @@ -21,7 +21,7 @@ interface Props extends FieldProps { classes?: object; } -export const FileField: FunctionComponent = ({ +const FileField: FunctionComponent = ({ className, classes: classesOverride, record, diff --git a/packages/ra-ui-materialui/src/field/ImageField.spec.js b/packages/ra-ui-materialui/src/field/ImageField.spec.js index ee93bb4cd76..3fc8438a2ab 100644 --- a/packages/ra-ui-materialui/src/field/ImageField.spec.js +++ b/packages/ra-ui-materialui/src/field/ImageField.spec.js @@ -1,7 +1,7 @@ import React from 'react'; import expect from 'expect'; import { render, cleanup } from '@testing-library/react'; -import { ImageField } from './ImageField'; +import ImageField from './ImageField'; const defaultProps = { classes: {}, diff --git a/packages/ra-ui-materialui/src/field/ImageField.tsx b/packages/ra-ui-materialui/src/field/ImageField.tsx index 4b93b8c9f6c..cbac9cb42af 100644 --- a/packages/ra-ui-materialui/src/field/ImageField.tsx +++ b/packages/ra-ui-materialui/src/field/ImageField.tsx @@ -27,7 +27,7 @@ interface Props extends FieldProps { classes?: object; } -export const ImageField: FunctionComponent = ({ +const ImageField: FunctionComponent = ({ className, classes: classesOverride, record, diff --git a/packages/ra-ui-materialui/src/field/ReferenceArrayField.js b/packages/ra-ui-materialui/src/field/ReferenceArrayField.js index b08317912e5..85cc19b2ad4 100644 --- a/packages/ra-ui-materialui/src/field/ReferenceArrayField.js +++ b/packages/ra-ui-materialui/src/field/ReferenceArrayField.js @@ -37,7 +37,7 @@ import { fieldPropTypes } from './types'; * * */ -export const ReferenceArrayField = ({ children, ...props }) => { +const ReferenceArrayField = ({ children, ...props }) => { if (React.Children.count(children) !== 1) { throw new Error( ' only accepts a single child (like )' diff --git a/packages/ra-ui-materialui/src/form/FormInput.js b/packages/ra-ui-materialui/src/form/FormInput.js index c7573d07c85..94170ce2993 100644 --- a/packages/ra-ui-materialui/src/form/FormInput.js +++ b/packages/ra-ui-materialui/src/form/FormInput.js @@ -14,7 +14,7 @@ const useStyles = makeStyles( { name: 'RaFormInput' } ); -export const FormInput = ({ input, classes: classesOverride, ...rest }) => { +const FormInput = ({ input, classes: classesOverride, ...rest }) => { const classes = useStyles({ classes: classesOverride }); return input ? (
{ return convertDateToString(new Date(value)); }; -export const DateInput: FunctionComponent< +const DateInput: FunctionComponent< InputProps & Omit > = ({ format = getStringFromDate, diff --git a/packages/ra-ui-materialui/src/input/DateTimeInput.tsx b/packages/ra-ui-materialui/src/input/DateTimeInput.tsx index bd4c17b782c..72dcb141351 100644 --- a/packages/ra-ui-materialui/src/input/DateTimeInput.tsx +++ b/packages/ra-ui-materialui/src/input/DateTimeInput.tsx @@ -63,7 +63,7 @@ const parseDateTime = (value: string) => new Date(value); /** * Input component for entering a date and a time with timezone, using the browser locale */ -export const DateTimeInput: FunctionComponent< +const DateTimeInput: FunctionComponent< InputProps & Omit > = ({ format = formatDateTime, diff --git a/packages/ra-ui-materialui/src/input/Labeled.tsx b/packages/ra-ui-materialui/src/input/Labeled.tsx index 80b0cf7926f..5105cdcae58 100644 --- a/packages/ra-ui-materialui/src/input/Labeled.tsx +++ b/packages/ra-ui-materialui/src/input/Labeled.tsx @@ -55,7 +55,7 @@ interface Props { * * */ -export const Labeled: FunctionComponent = ({ +const Labeled: FunctionComponent = ({ children, className, classes: classesOverride, diff --git a/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.tsx b/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.tsx index 6d33cf173d1..48b610cf91c 100644 --- a/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.tsx +++ b/packages/ra-ui-materialui/src/input/RadioButtonGroupInput.tsx @@ -85,7 +85,7 @@ const useStyles = makeStyles( * * The object passed as `options` props is passed to the material-ui component */ -export const RadioButtonGroupInput: FunctionComponent< +const RadioButtonGroupInput: FunctionComponent< ChoicesProps & InputProps & FormControlProps > = ({ choices = [], diff --git a/packages/ra-ui-materialui/src/input/ReferenceArrayInput.js b/packages/ra-ui-materialui/src/input/ReferenceArrayInput.js index c53c237ec1a..6958246b9d7 100644 --- a/packages/ra-ui-materialui/src/input/ReferenceArrayInput.js +++ b/packages/ra-ui-materialui/src/input/ReferenceArrayInput.js @@ -89,7 +89,7 @@ import ReferenceError from './ReferenceError'; * * */ -export const ReferenceArrayInput = ({ +const ReferenceArrayInput = ({ children, id: idOverride, onBlur, diff --git a/packages/ra-ui-materialui/src/input/ReferenceInput.tsx b/packages/ra-ui-materialui/src/input/ReferenceInput.tsx index 4da477eb06a..41fb0c78b01 100644 --- a/packages/ra-ui-materialui/src/input/ReferenceInput.tsx +++ b/packages/ra-ui-materialui/src/input/ReferenceInput.tsx @@ -109,7 +109,7 @@ interface Props { * * */ -export const ReferenceInput: FunctionComponent = ({ +const ReferenceInput: FunctionComponent = ({ format, onBlur, onChange, diff --git a/packages/ra-ui-materialui/src/input/TextInput.tsx b/packages/ra-ui-materialui/src/input/TextInput.tsx index 00ff175e1c0..d3476a7be36 100644 --- a/packages/ra-ui-materialui/src/input/TextInput.tsx +++ b/packages/ra-ui-materialui/src/input/TextInput.tsx @@ -24,7 +24,7 @@ export type TextInputProps = InputProps & * * The object passed as `options` props is passed to the component */ -export const TextInput: FunctionComponent = ({ +const TextInput: FunctionComponent = ({ label, format, helperText, diff --git a/packages/ra-ui-materialui/src/layout/LoadingIndicator.js b/packages/ra-ui-materialui/src/layout/LoadingIndicator.js index dd505842858..b93588d9382 100644 --- a/packages/ra-ui-materialui/src/layout/LoadingIndicator.js +++ b/packages/ra-ui-materialui/src/layout/LoadingIndicator.js @@ -16,11 +16,7 @@ const useStyles = makeStyles( { name: 'RaLoadingIndicator' } ); -export const LoadingIndicator = ({ - classes: classesOverride, - className, - ...rest -}) => { +const LoadingIndicator = ({ classes: classesOverride, className, ...rest }) => { const loading = useSelector(state => state.admin.loading > 0); const classes = useStyles({ classes: classesOverride }); return loading ? ( diff --git a/packages/ra-ui-materialui/src/list/DatagridCell.js b/packages/ra-ui-materialui/src/list/DatagridCell.js index 6c2aa1ee97e..9d4c3e4240b 100644 --- a/packages/ra-ui-materialui/src/list/DatagridCell.js +++ b/packages/ra-ui-materialui/src/list/DatagridCell.js @@ -15,7 +15,7 @@ const sanitizeRestProps = ({ ...rest }) => rest; -export const DatagridCell = ({ +const DatagridCell = ({ className, field, record, diff --git a/packages/ra-ui-materialui/src/list/DatagridCell.spec.js b/packages/ra-ui-materialui/src/list/DatagridCell.spec.js index 76e81b049f5..55be959ff63 100644 --- a/packages/ra-ui-materialui/src/list/DatagridCell.spec.js +++ b/packages/ra-ui-materialui/src/list/DatagridCell.spec.js @@ -3,7 +3,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { shallow } from 'enzyme'; -import { DatagridCell } from './DatagridCell'; +import DatagridCell from './DatagridCell'; describe('', () => { const Field = () =>
; diff --git a/packages/ra-ui-materialui/src/list/Filter.spec.js b/packages/ra-ui-materialui/src/list/Filter.spec.js index fef8daf155a..00bcae06320 100644 --- a/packages/ra-ui-materialui/src/list/Filter.spec.js +++ b/packages/ra-ui-materialui/src/list/Filter.spec.js @@ -1,6 +1,6 @@ import React from 'react'; import { render, cleanup } from '@testing-library/react'; -import { TextInput } from '../input/TextInput'; +import TextInput from '../input/TextInput'; import Filter from './Filter'; describe('', () => {