From 0815fd2ba1c69d21bdfc37ca1ad86e506f999613 Mon Sep 17 00:00:00 2001 From: Dane Pilcher Date: Thu, 4 Nov 2021 21:06:10 +0000 Subject: [PATCH] feat: remove support for TextField primitive --- .../lib/amplify-ui-renderers/amplify-renderer.ts | 3 ++- .../integration-test-templates/src/PrimitivesTests.tsx | 4 ++-- packages/test-generator/lib/components/primitives/index.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/studio-ui-codegen-react/lib/amplify-ui-renderers/amplify-renderer.ts b/packages/studio-ui-codegen-react/lib/amplify-ui-renderers/amplify-renderer.ts index 7291eeb1a..793bbc719 100644 --- a/packages/studio-ui-codegen-react/lib/amplify-ui-renderers/amplify-renderer.ts +++ b/packages/studio-ui-codegen-react/lib/amplify-ui-renderers/amplify-renderer.ts @@ -293,7 +293,8 @@ export class AmplifyRenderer extends ReactStudioTemplateRenderer { return new TextRenderer(component, this.importCollection, parent).renderElement(); case Primitives.TextField: - // TODO: use correct prop type + // unofficial support to retain functionality + // TODO: add official support return new ReactComponentWithChildrenRenderer( component, this.importCollection, diff --git a/packages/test-generator/integration-test-templates/src/PrimitivesTests.tsx b/packages/test-generator/integration-test-templates/src/PrimitivesTests.tsx index 4587f963c..b31bebd4c 100644 --- a/packages/test-generator/integration-test-templates/src/PrimitivesTests.tsx +++ b/packages/test-generator/integration-test-templates/src/PrimitivesTests.tsx @@ -34,7 +34,7 @@ import StepperFieldPrimitive from './ui-components/StepperFieldPrimitive'; import SwitchFieldPrimitive from './ui-components/SwitchFieldPrimitive'; import TabsPrimitive from './ui-components/TabsPrimitive'; import TextPrimitive from './ui-components/TextPrimitive'; -import TextFieldPrimitive from './ui-components/TextFieldPrimitive'; +// import TextFieldPrimitive from './ui-components/TextFieldPrimitive'; import ToggleButtonPrimitive from './ui-components/ToggleButtonPrimitive'; import ToggleButtonGroupPrimitive from './ui-components/ToggleButtonGroupPrimitive'; import ViewPrimitive from './ui-components/ViewPrimitive'; @@ -77,7 +77,7 @@ export default function PrimitivesTests() { - + {/* */} diff --git a/packages/test-generator/lib/components/primitives/index.ts b/packages/test-generator/lib/components/primitives/index.ts index f97ed2808..f592383f9 100644 --- a/packages/test-generator/lib/components/primitives/index.ts +++ b/packages/test-generator/lib/components/primitives/index.ts @@ -47,7 +47,7 @@ export { default as StepperFieldPrimitive } from './StepperFieldPrimitive.json'; export { default as SwitchFieldPrimitive } from './SwitchFieldPrimitive.json'; export { default as TabsPrimitive } from './TabsPrimitive.json'; export { default as TextPrimitive } from './TextPrimitive.json'; -export { default as TextFieldPrimitive } from './TextFieldPrimitive.json'; +// export { default as TextFieldPrimitive } from './TextFieldPrimitive.json'; export { default as ToggleButtonPrimitive } from './ToggleButtonPrimitive.json'; export { default as ToggleButtonGroupPrimitive } from './ToggleButtonGroupPrimitive.json'; export { default as ViewPrimitive } from './ViewPrimitive.json';