Skip to content

Commit

Permalink
feat: remove FieldGroup, FieldGroupIcon, and FieldGroupIconButton pri…
Browse files Browse the repository at this point in the history
…mitives (#207)

These primitives are for amplify-ui internal use only
  • Loading branch information
dpilch authored Nov 9, 2021
1 parent 84b28c3 commit baa8e64
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 60 deletions.
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

0 comments on commit baa8e64

Please sign in to comment.