Skip to content
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

Default props for mail template previews #19

Open
Josh-Walker-GM opened this issue Jan 29, 2024 · 1 comment
Open

Default props for mail template previews #19

Josh-Walker-GM opened this issue Jan 29, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Josh-Walker-GM
Copy link
Contributor

Currently, when you visit a template preview you get a placeholder value that simply shows the prop keys that we managed to work out from your template files.

Feedback here from the community highlights that it is kind of a pain to have to retype in many prop values to get the template to render.

Perhaps we could add some expected named export (defaultProps) which contains a list of default props. We would then use them as the defaults allowing the mail template to render immediately rather than fail given the lack of props.

@Josh-Walker-GM Josh-Walker-GM added the enhancement New feature or request label Jan 29, 2024
@dthyresson
Copy link
Collaborator

I noticed this when demoing — as the value of props changes can get GraphQL errors with malformed JSON.

Might need to denounce on set not on change but add a submit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants