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

Add default value documentation to props #44

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

emmclaughlin
Copy link
Collaborator

@emmclaughlin emmclaughlin commented Oct 26, 2022

Related to #9

We want to see if we can further take advantage of typescript and add information about the props. In this PR we update to provide the MJML default values (i.e. the fallback if the value is undefined)

One caveat here is that this is not a react default/fallback. It is the default from MJML itself. That is why I chose to not use the jsdoc tags, as I feel like they suggest a default value in react, not in MJML itself.

We could alternatively add the value as a default value in React, but this seems superfluous as it forces that value to be set in react when it is a fallback anyway in MJML.

Let me know what you think.

@emmclaughlin emmclaughlin changed the title Add default value documentation Add default value documentation to props Oct 26, 2022
@IanEdington
Copy link
Contributor

related to #9: Hopefully we can expand on this in the future

@IanEdington
Copy link
Contributor

One caveat here is that this is not a react default/fallback. It is the default from MJML itself. That is why I chose to not use the jsdoc tags, as I feel like they suggest a default value in react, not in MJML itself.

That makes sense to me

@emmclaughlin
Copy link
Collaborator Author

related to #9: Hopefully we can expand on this in the future

If by expand you mean look at adding descriptions from the MJML documentation we will look into that. These are all of the default values available from the MJML documentation though so we are maxed out on default value information

@emmclaughlin emmclaughlin merged commit 739787d into main-v3 Oct 26, 2022
@emmclaughlin emmclaughlin deleted the evan/add-documentation branch October 26, 2022 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants