-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ability to pass a component in light prop #1405
ability to pass a component in light prop #1405
Conversation
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.
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!
Thanks @n3llym I've done the changes, linted and tested. Appreciate your review! |
cba4125
to
f386d87
Compare
I tidied things up a bit to remove the need for the extra stuff in |
Published in |
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
light
is a componentrefers to #1320