-
Notifications
You must be signed in to change notification settings - Fork 25
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: add support for most existing primitives #194
Conversation
@@ -0,0 +1,63 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed component-renderer.test.ts
-> primitives.test.ts
@@ -94,64 +117,23 @@ export class AmplifyRenderer extends ReactStudioTemplateRenderer { | |||
case Primitives.Divider: | |||
return new ReactComponentRenderer<DividerProps>(component, this.importCollection, parent).renderElement(); | |||
|
|||
case Primitives.Field: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These primitives are not exposed from amplify-ui
. I included these by mistake originally.
0815fd2
to
9cf2c64
Compare
@@ -15,7 +15,7 @@ | |||
"build:watch": "npm run build -- --watch" | |||
}, | |||
"devDependencies": { | |||
"@aws-amplify/ui-react": "^0.0.0-next-202192018414", | |||
"@aws-amplify/ui-react": "^0.0.0-next-2021101222549", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some primitives were added recently. We could also stick with current version and start with what is available.
const jsxStatement = factory.createParenthesizedExpression( | ||
this.renderConfig.script !== ScriptKind.TSX | ||
? jsx | ||
: /* add ts-ignore comment above jsx statement TODO: add asana */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd drop the ref to asana here. I'm just now realizing I'd done this as well, but unless it's an externally visible issue we shouldn't be referencing it in code.
Do not add TextField primitive because it requires special logic
TextField
primitive because it requires special logicTextFieldProps
takes a type parameter. Need to think more on how to handle this.To Do: