-
Notifications
You must be signed in to change notification settings - Fork 679
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
Add support for customising the DayCell #483
Conversation
+1 |
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.
LGTM except for one thing
034f65e
to
48e7070
Compare
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.
Looks great!
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.
Looks good
Hi everyone! Wouldn't be useful to implement something similar to this but for the whole button, not just for the content? So instead of doing this: <button
// ...buttonProps
>
{dayContentRenderer?.(this.props.day) || (
<span>{format(this.props.day, this.props.dayDisplayFormat)}</span>
)}
</button> We'll be doing this: if (dayContentRenderer) {
return dayContentRenderer({
...buttonProps
});
}
return (
<button
// ...buttonProps
>
<span>{format(this.props.day, this.props.dayDisplayFormat)}</span>
</button>
) What do you think? |
What types of changes does your code introduce?
Description
Adds support for passing a function to customize DayCell content.