Skip to content

Commit

Permalink
Merge pull request #111 from bettyblocks/feat/template-reconfigure-st…
Browse files Browse the repository at this point in the history
…rategy-PAGE-2622

feat: move reconfigure to options
  • Loading branch information
ingmar-stipriaan authored Jan 16, 2023
2 parents 8563309 + a47c83f commit c9f819d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
6 changes: 0 additions & 6 deletions src/prefabs/factories/prefab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,9 @@ export const prefab = (
attr: Attributes,
beforeCreate: BeforeCreate | undefined,
structure: PrefabReference[],
reconfigure?: {
children: PrefabComponent[];
reconfigureWizardType?: string;
addChildWizardType?: string;
},
): Prefab => ({
name,
...attr,
beforeCreate: beforeCreate?.toString(),
structure,
reconfigure,
});
4 changes: 4 additions & 0 deletions src/prefabs/types/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export interface PrefabWrapperLinkedOption extends PrefabLinkedOptionBase {
optionId: string;
};
};
showInReconfigure?: boolean;
showInAddChild?: boolean;
}

export interface PrefabWrapperLinkedPartialOption
Expand All @@ -91,6 +93,8 @@ export interface PrefabWrapperLinkedPartialOption
componentId: string;
};
};
showInReconfigure?: boolean;
showInAddChild?: boolean;
}

export type PrefabComponentStyle = {
Expand Down
7 changes: 1 addition & 6 deletions src/prefabs/types/prefabs/prefabs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Icon } from './icon';
import { PrefabAction } from '../actions';
import { PrefabReference, PrefabComponent } from '../component';
import { PrefabReference } from '../component';
import { PrefabInteraction, PrefabVariable } from '../interactions';

export interface Prefab {
Expand All @@ -15,9 +15,4 @@ export interface Prefab {
variables?: PrefabVariable[];
type?: string;
description?: string;
reconfigure?: {
children: PrefabComponent[];
reconfigureWizardType?: string;
addChildWizardType?: string;
};
}

0 comments on commit c9f819d

Please sign in to comment.