ability to pass a component in light prop - #1405
Merged
Merged
Conversation
n3llym
reviewed
Jun 8, 2022
There was a problem hiding this comment.
Thanks @idiglove, and good job. It would be great to get this added!
Just a few things I noticed I've added some inline comments as well as the below.
- You need to add the new type in base.d.ts i.e
light?: boolean | string | ReactElement - You need to update the light prop type in props.js i.e
light: oneOfType([bool, string, object]) - Also don’t forget to run lint and run the tests!
Contributor
Author
|
Thanks @n3llym I've done the changes, linted and tested. Appreciate your review! |
cookpete
force-pushed
the
feature/preview-as-component
branch
from
July 17, 2022 12:42
cba4125 to
f386d87
Compare
Owner
|
I tidied things up a bit to remove the need for the extra stuff in |
Closed
Owner
|
Published in |
This was referenced Mar 12, 2023
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.
the light prop could be like this:
light={<img style={{position: 'relative', width: '100%', height: '100%'}} src='https://media.nationalgeographic.org/assets/photos/000/290/29094.jpg' alt='sun' />}The styling of the image component should come from where it was called
The play icon will be positioned absolute if
lightis a componentrefers to #1320