Skip to content

Commit 85ecd5e

Browse files
JshhhhJustin Shih
andauthored
feat: add override and variant exports from ui-react to utils (#1104)
Co-authored-by: Justin Shih <[email protected]>
1 parent 7c00e4c commit 85ecd5e

18 files changed

+2198
-791
lines changed

packages/codegen-ui-react/lib/__tests__/__snapshots__/react-studio-template-renderer-helper.test.ts.snap

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ exports[`react-studio-template-renderer-helper transpile fails to transpile with
1414

1515
exports[`react-studio-template-renderer-helper transpile successfully transpiles with ScriptTarget ES3 1`] = `
1616
"import * as React from \\"react\\";
17-
import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
17+
import { EscapeHatchProps } from \\"./utils\\";
1818
import { CustomButtonProps } from \\"./CustomButton\\";
1919
import { ViewTestProps } from \\"./ViewTest\\";
2020
export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;
@@ -31,7 +31,7 @@ export default function CustomParentAndChildren(props: CustomParentAndChildrenPr
3131
3232
exports[`react-studio-template-renderer-helper transpile successfully transpiles with ScriptTarget ES5 1`] = `
3333
"import * as React from \\"react\\";
34-
import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
34+
import { EscapeHatchProps } from \\"./utils\\";
3535
import { CustomButtonProps } from \\"./CustomButton\\";
3636
import { ViewTestProps } from \\"./ViewTest\\";
3737
export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;
@@ -48,7 +48,7 @@ export default function CustomParentAndChildren(props: CustomParentAndChildrenPr
4848
4949
exports[`react-studio-template-renderer-helper transpile successfully transpiles with ScriptTarget ES2015 1`] = `
5050
"import * as React from \\"react\\";
51-
import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
51+
import { EscapeHatchProps } from \\"./utils\\";
5252
import { CustomButtonProps } from \\"./CustomButton\\";
5353
import { ViewTestProps } from \\"./ViewTest\\";
5454
export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;
@@ -65,7 +65,7 @@ export default function CustomParentAndChildren(props: CustomParentAndChildrenPr
6565
6666
exports[`react-studio-template-renderer-helper transpile successfully transpiles with ScriptTarget ES2016 1`] = `
6767
"import * as React from \\"react\\";
68-
import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
68+
import { EscapeHatchProps } from \\"./utils\\";
6969
import { CustomButtonProps } from \\"./CustomButton\\";
7070
import { ViewTestProps } from \\"./ViewTest\\";
7171
export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;
@@ -82,7 +82,7 @@ export default function CustomParentAndChildren(props: CustomParentAndChildrenPr
8282
8383
exports[`react-studio-template-renderer-helper transpile successfully transpiles with ScriptTarget ES2017 1`] = `
8484
"import * as React from \\"react\\";
85-
import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
85+
import { EscapeHatchProps } from \\"./utils\\";
8686
import { CustomButtonProps } from \\"./CustomButton\\";
8787
import { ViewTestProps } from \\"./ViewTest\\";
8888
export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;
@@ -99,7 +99,7 @@ export default function CustomParentAndChildren(props: CustomParentAndChildrenPr
9999
100100
exports[`react-studio-template-renderer-helper transpile successfully transpiles with ScriptTarget ES2018 1`] = `
101101
"import * as React from \\"react\\";
102-
import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
102+
import { EscapeHatchProps } from \\"./utils\\";
103103
import { CustomButtonProps } from \\"./CustomButton\\";
104104
import { ViewTestProps } from \\"./ViewTest\\";
105105
export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;
@@ -116,7 +116,7 @@ export default function CustomParentAndChildren(props: CustomParentAndChildrenPr
116116
117117
exports[`react-studio-template-renderer-helper transpile successfully transpiles with ScriptTarget ES2019 1`] = `
118118
"import * as React from \\"react\\";
119-
import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
119+
import { EscapeHatchProps } from \\"./utils\\";
120120
import { CustomButtonProps } from \\"./CustomButton\\";
121121
import { ViewTestProps } from \\"./ViewTest\\";
122122
export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;
@@ -133,7 +133,7 @@ export default function CustomParentAndChildren(props: CustomParentAndChildrenPr
133133
134134
exports[`react-studio-template-renderer-helper transpile successfully transpiles with ScriptTarget ES2020 1`] = `
135135
"import * as React from \\"react\\";
136-
import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
136+
import { EscapeHatchProps } from \\"./utils\\";
137137
import { CustomButtonProps } from \\"./CustomButton\\";
138138
import { ViewTestProps } from \\"./ViewTest\\";
139139
export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;
@@ -150,7 +150,7 @@ export default function CustomParentAndChildren(props: CustomParentAndChildrenPr
150150
151151
exports[`react-studio-template-renderer-helper transpile successfully transpiles with ScriptTarget ES2021 1`] = `
152152
"import * as React from \\"react\\";
153-
import { EscapeHatchProps } from \\"@aws-amplify/ui-react/internal\\";
153+
import { EscapeHatchProps } from \\"./utils\\";
154154
import { CustomButtonProps } from \\"./CustomButton\\";
155155
import { ViewTestProps } from \\"./ViewTest\\";
156156
export declare type PrimitiveOverrideProps<T> = Partial<T> & React.DOMAttributes<HTMLDivElement>;

0 commit comments

Comments
 (0)