Skip to content

Commit

Permalink
fix: update theme generation for new schema (#142)
Browse files Browse the repository at this point in the history
Limitations with smithy required schema change.
  • Loading branch information
dpilch committed Oct 26, 2021
1 parent ee9e1b4 commit a780893
Show file tree
Hide file tree
Showing 9 changed files with 340 additions and 25,744 deletions.
19 changes: 14 additions & 5 deletions packages/amplify-ui-codegen-schema/lib/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
import { theme } from '@aws-amplify/ui';

export type FigmaMetadata = {
/**
* The document URL for the figma document
Expand Down Expand Up @@ -497,11 +495,22 @@ export type StudioComponentStorageBindingProperty = {
key?: string;
};

type DeepPartial<T> = {
[K in keyof T]?: DeepPartial<T[K]>;
export type StudioTheme = {
name: string;
id?: string;
values: StudioThemeValues;
// overrides is a special case becuase it is an array of values
overrides?: StudioThemeValues[];
};

export type StudioThemeValues = {
[token: string]: StudioThemeValue;
};

export type StudioTheme = DeepPartial<typeof theme>;
export type StudioThemeValue = {
value?: string;
children?: StudioThemeValues;
};

/**
* Component action types
Expand Down

0 comments on commit a780893

Please sign in to comment.