Skip to content

Commit

Permalink
feat: remove string component type
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilch committed Nov 3, 2021
1 parent 278b6f8 commit 0cbbbdc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import { StudioComponent } from '@amzn/studio-ui-codegen';
import { assertASTMatchesSnapshot } from '../__utils__/snapshot-helpers';

import renderString from '../../amplify-ui-renderers/string';
import { AmplifyRenderer } from '../../amplify-ui-renderers/amplify-renderer';

function testComponentRenderer(component: StudioComponent) {
Expand Down Expand Up @@ -124,28 +123,4 @@ describe('Component Renderers', () => {
};
testComponentRenderer(component);
});

test('StringRenderer', () => {
const component = {
componentType: 'String',
name: 'MyString',
properties: {
value: {
value: 'test',
},
},
bindingProperties: {},
};
testComponentRenderer(component);
});

test('StringRenderer throws on missing props', () => {
const component = {
componentType: 'String',
name: 'MyString',
properties: {},
bindingProperties: {},
};
expect(() => renderString(component)).toThrowErrorMatchingSnapshot();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
import Primitives from '../primitives';
import { ReactStudioTemplateRenderer } from '../react-studio-template-renderer';
import TextRenderer from './text';
import renderString from './string';
import CustomComponentRenderer from './customComponent';
import CollectionRenderer from './collection';
import { ReactComponentWithChildrenRenderer } from '../react-component-with-children-renderer';
Expand Down Expand Up @@ -402,10 +401,6 @@ export class AmplifyRenderer extends ReactStudioTemplateRenderer {
parent,
).renderElement(renderChildren);

// to be removed
case 'String':
return renderString(component as StudioComponentChild);

default:
return new CustomComponentRenderer(component, this.importCollection, parent).renderElement(renderChildren);
}
Expand Down

This file was deleted.

0 comments on commit 0cbbbdc

Please sign in to comment.