Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove FieldGroup, FieldGroupIcon, and FieldGroupIconButton primitives #207

Merged
merged 1 commit into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ exports[`Primitives Collection 1`] = `"<Collection items={items || []} {...rest}

exports[`Primitives Divider 1`] = `"<Divider {...rest} {...getOverrideProps(overrides, \\"Divider\\")}></Divider>"`;

exports[`Primitives FieldGroup 1`] = `"<FieldGroup {...rest} {...getOverrideProps(overrides, \\"FieldGroup\\")}></FieldGroup>"`;

exports[`Primitives FieldGroupIcon 1`] = `"<FieldGroupIcon {...rest} {...getOverrideProps(overrides, \\"FieldGroupIcon\\")}></FieldGroupIcon>"`;

exports[`Primitives FieldGroupIconButton 1`] = `"<FieldGroupIconButton {...rest} {...getOverrideProps(overrides, \\"FieldGroupIconButton\\")}></FieldGroupIconButton>"`;

exports[`Primitives Flex 1`] = `"<Flex {...rest} {...getOverrideProps(overrides, \\"Flex\\")}></Flex>"`;

exports[`Primitives Grid 1`] = `"<Grid {...rest} {...getOverrideProps(overrides, \\"Grid\\")}></Grid>"`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import {
CardProps,
CheckboxFieldProps,
DividerProps,
FieldGroupIconProps,
FieldGroupIconButtonProps,
FlexProps,
GridProps,
HeadingProps,
Expand Down Expand Up @@ -116,28 +114,6 @@ export class AmplifyRenderer extends ReactStudioTemplateRenderer {
case Primitive.Divider:
return new ReactComponentRenderer<DividerProps>(component, this.importCollection, parent).renderElement();

case Primitive.FieldGroup:
// TODO: Use correct prop type
return new ReactComponentWithChildrenRenderer<ViewProps>(
component,
this.importCollection,
parent,
).renderElement(renderChildren);

case Primitive.FieldGroupIcon:
return new ReactComponentWithChildrenRenderer<FieldGroupIconProps>(
component,
this.importCollection,
parent,
).renderElement(renderChildren);

case Primitive.FieldGroupIconButton:
return new ReactComponentWithChildrenRenderer<FieldGroupIconButtonProps>(
component,
this.importCollection,
parent,
).renderElement(renderChildren);

case Primitive.Flex:
return new ReactComponentWithChildrenRenderer<FlexProps>(
component,
Expand Down
3 changes: 0 additions & 3 deletions packages/studio-ui-codegen-react/lib/primitive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ enum Primitive {
CheckboxField = 'CheckboxField',
Collection = 'Collection',
Divider = 'Divider',
FieldGroup = 'FieldGroup',
FieldGroupIcon = 'FieldGroupIcon',
FieldGroupIconButton = 'FieldGroupIconButton',
Flex = 'Flex',
Grid = 'Grid',
Heading = 'Heading',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ import CardPrimitive from './ui-components/CardPrimitive';
import CheckboxFieldPrimitive from './ui-components/CheckboxFieldPrimitive';
import CollectionPrimitive from './ui-components/CollectionPrimitive';
import DividerPrimitive from './ui-components/DividerPrimitive';
import FieldGroupPrimitive from './ui-components/FieldGroupPrimitive';
import FieldGroupIconPrimitive from './ui-components/FieldGroupIconPrimitive';
import FieldGroupIconButtonPrimitive from './ui-components/FieldGroupIconButtonPrimitive';
import FlexPrimitive from './ui-components/FlexPrimitive';
import GridPrimitive from './ui-components/GridPrimitive';
import HeadingPrimitive from './ui-components/HeadingPrimitive';
Expand Down Expand Up @@ -51,9 +48,6 @@ export default function PrimitivesTests() {
<CheckboxFieldPrimitive />
<CollectionPrimitive />
<DividerPrimitive />
<FieldGroupPrimitive />
<FieldGroupIconPrimitive />
<FieldGroupIconButtonPrimitive />
<FlexPrimitive />
<GridPrimitive />
<HeadingPrimitive />
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions packages/test-generator/lib/components/primitives/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ export { default as CardPrimitive } from './CardPrimitive.json';
export { default as CheckboxFieldPrimitive } from './CheckboxFieldPrimitive.json';
export { default as CollectionPrimitive } from './CollectionPrimitive.json';
export { default as DividerPrimitive } from './DividerPrimitive.json';
export { default as FieldGroupPrimitive } from './FieldGroupPrimitive.json';
export { default as FieldGroupIconPrimitive } from './FieldGroupIconPrimitive.json';
export { default as FieldGroupIconButtonPrimitive } from './FieldGroupIconButtonPrimitive.json';
export { default as FlexPrimitive } from './FlexPrimitive.json';
export { default as GridPrimitive } from './GridPrimitive.json';
export { default as HeadingPrimitive } from './HeadingPrimitive.json';
Expand Down