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

Allow for custom labels #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Allow for custom labels #10

wants to merge 2 commits into from

Conversation

brymon68
Copy link

I can write a test as well but you can also demo here by choosing to pass in label prop or not: https://codesandbox.io/s/62k69jmj0n

@jonas-app
Copy link
Owner

Thx for your contribution! 💯

I would like to avoid passing all the the input props down into the component.
Because I think there are a lot more use cases apart from the label.
As stated yesterday I think we should go a more abstract route:
#9 (comment)
Have you got some ideas how we could make it this way?
My idea was to mimic the downshift api and just pass down patched versions of getLabelProps and getInputProps as render props.
This way anyone can use any input with the date picker.

Really like the code sandbox. Is it also possible to connect it to the example from the repository (to stay in sync)? Would like to add it here: https://github.com/geeofree/kalendaryo#examples

@brymon68
Copy link
Author

Here is an example that will stay up to date via npm: https://codesandbox.io/s/zwzo0qojyx

As for how to proceed with a more generic approach, I will defer to you on that. I am happy to contribute once you have an idea to move forward with. For now, I will remove label manually.

@jonas-app
Copy link
Owner

jonas-app commented May 13, 2020 via email

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