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

Added a prop for light mode in the tooltip #10

Merged
merged 1 commit into from
Oct 14, 2020
Merged

Added a prop for light mode in the tooltip #10

merged 1 commit into from
Oct 14, 2020

Conversation

ankiiitraj
Copy link
Contributor

Fixes #9
Gif demonstration for changes!
ezgif com-video-to-gif(1)

@ankiiitraj
Copy link
Contributor Author

@prateek3255 this is ready for review!

src/lib/index.tsx Outdated Show resolved Hide resolved
@ankiiitraj
Copy link
Contributor Author

@prateek3255 Ready for the review! Mentioning for visibility! 😃

backgroundColor: "white",
color: "black",
}

const tooltipBaseStyles: React.CSSProperties = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a function that accepts theme instead of creating another variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean a function that takes theme as input and returns the properties of the theme.
in this case, if theme is light function should return {backgrondColor: "white", color: "black"}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes check #12, also create a type for theme similar to #12

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! :)

updated Props table on Readme

using typescript string literals

fixes
@prateek3255 prateek3255 merged commit 29e1790 into devfolioco:master Oct 14, 2020
@prateek3255
Copy link
Collaborator

Thanks for working on this @ankiiitraj

@prateek3255
Copy link
Collaborator

@all-contributors please add @ankiiitraj for code

@allcontributors
Copy link
Contributor

@prateek3255

I've put up a pull request to add @ankiiitraj! 🎉

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.

Add a prop for light mode in the tooltip
2 participants