diff --git a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/TextField.tsx b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/TextField.tsx index 961e47eb093..4cfa4c0c48c 100644 --- a/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/TextField.tsx +++ b/app/src/organisms/Devices/RobotSettings/ConnectNetwork/ConnectModal/TextField.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { - InputField, + LegacyInputField, DeprecatedCheckboxField, INPUT_TYPE_TEXT, INPUT_TYPE_PASSWORD, @@ -37,7 +37,7 @@ export const TextField = (props: TextFieldProps): JSX.Element => { return ( - {isPassword && ( diff --git a/components/src/forms/InputField.stories.tsx b/components/src/forms/InputField.stories.tsx index c6d98531ff1..2ca998acd2f 100644 --- a/components/src/forms/InputField.stories.tsx +++ b/components/src/forms/InputField.stories.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { Box, SIZE_6 } from '@opentrons/components' -import { InputField as InputFieldComponent } from './InputField' +import { LegacyInputField as InputFieldComponent } from './LegacyInputField' import type { Story, Meta } from '@storybook/react' diff --git a/components/src/forms/InputField.tsx b/components/src/forms/LegacyInputField.tsx similarity index 94% rename from components/src/forms/InputField.tsx rename to components/src/forms/LegacyInputField.tsx index 899594bc187..989f4509be3 100644 --- a/components/src/forms/InputField.tsx +++ b/components/src/forms/LegacyInputField.tsx @@ -8,7 +8,7 @@ export const INPUT_TYPE_PASSWORD: 'password' = 'password' // TODO: Ian 2018-09-14 remove 'label' prop when IngredientPropertiesForm gets updated -export interface InputFieldProps { +export interface LegacyInputFieldProps { /** field is disabled if value is true */ disabled?: boolean /** change handler */ @@ -54,10 +54,10 @@ export interface InputFieldProps { } /** - * @deprecated Use `InputField` in App/atoms instead + * @deprecated Use `InputField` */ -export function InputField(props: InputFieldProps): JSX.Element { +export function LegacyInputField(props: LegacyInputFieldProps): JSX.Element { const error = props.error != null const labelClass = cx(styles.form_field, props.className, { [styles.error]: error, @@ -88,7 +88,7 @@ export function InputField(props: InputFieldProps): JSX.Element { } // TODO(mc, 2018-02-21): maybe simplify further and split out? -function Input(props: InputFieldProps): JSX.Element { +function Input(props: LegacyInputFieldProps): JSX.Element { const error = props.error != null const value = props.isIndeterminate ? '' : props.value ?? '' const placeHolder = props.isIndeterminate ? '-' : props.placeholder diff --git a/components/src/forms/index.ts b/components/src/forms/index.ts index bdadbdaba99..c8cd6e2b0f0 100644 --- a/components/src/forms/index.ts +++ b/components/src/forms/index.ts @@ -1,7 +1,7 @@ export * from './DeprecatedCheckboxField' export * from './DropdownField' export * from './FormGroup' -export * from './InputField' +export * from './LegacyInputField' export * from './RadioGroup' export * from './Select' export * from './SelectField' diff --git a/labware-library/src/labware-creator/components/TextField.tsx b/labware-library/src/labware-creator/components/TextField.tsx index 37f2a6541f3..6072c96651f 100644 --- a/labware-library/src/labware-creator/components/TextField.tsx +++ b/labware-library/src/labware-creator/components/TextField.tsx @@ -1,10 +1,10 @@ import * as React from 'react' import { Field } from 'formik' -import { InputField } from '@opentrons/components' +import { LegacyInputField } from '@opentrons/components' import { reportFieldEdit } from '../analyticsUtils' import { getIsHidden } from '../formSelectors' import { getLabel } from '../fields' -import type { InputFieldProps } from '@opentrons/components' +import type { LegacyInputFieldProps } from '@opentrons/components' import type { LabwareFields } from '../fields' import type { FieldProps } from 'formik' import fieldStyles from './fieldStyles.module.css' @@ -13,9 +13,9 @@ interface Props { name: keyof LabwareFields label?: string placeholder?: string - caption?: InputFieldProps['caption'] + caption?: LegacyInputFieldProps['caption'] inputMasks?: Array<(prevValue: string, update: string) => string> - units?: InputFieldProps['units'] + units?: LegacyInputFieldProps['units'] } // NOTE(Ian 2019-07-23): per-field hide-when-autofilled is not yet necessary, @@ -44,7 +44,7 @@ export const TextField = (props: Props): JSX.Element => {