Optional image / height props and documentation note#9
Open
Roilan wants to merge 3 commits intochromakode:masterfrom
Open
Optional image / height props and documentation note#9Roilan wants to merge 3 commits intochromakode:masterfrom
Roilan wants to merge 3 commits intochromakode:masterfrom
Conversation
| An image, without any pesky borders, outlines, or underlines by default. Requires a `src` prop, and `width` and `height` to be set. You can override the default styles (such as adding a border) using the `style` prop. | ||
| An image, without any pesky borders, outlines, or underlines by default. Requires a `src` prop. Optional `width` and `height` props are available. You can override the default styles (such as adding a border) using the `style` prop. | ||
|
|
||
| `height` and `width` props default to `1px`. If you require a response image, for example, having `300px` of height and `auto` width. We recommend adding the number of pixels directly as a prop and having `auto` in your `headCSS`. |
Owner
There was a problem hiding this comment.
Nit: "response" -> "responsive"
Owner
|
Defaulting to 1px seems unwise to me; it's not an obvious behavior if you haven't used the module before and create an image with no dimensions. I would prefer that we require authors to specify an intentional width/height value (since this is email and sometimes CSS is not supported). @Roilan, have you encountered a use case where specifying know dimensions is undesirable or not possible? I think it might make sense to be opinionated here: keep the dimensions requirements and document the use case (as you have in this PR). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@chromakode Updates from our discussion from #8