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 8, 2021
1 parent aabb39f commit b432b01
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';
import Primitives from '../../primitives';

Expand All @@ -36,28 +35,4 @@ describe('Primitives', () => {
});
});
});

test('StringRenderer', () => {
const component = {
componentType: 'String',
name: 'MyString',
properties: {
value: {
value: 'test',
},
},
bindingProperties: {},
};
testPrimitive(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 @@ -56,7 +56,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 @@ -329,10 +328,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 b432b01

Please sign in to comment.