Closed nicolas-chalant closed 1 year ago
Thanks for your issue.
I have a function that returns the style based on the type, but eventCellStyle takes only one style, right ?
I didn't notice this, but yes. I'll the code to enable to have multiple styles soon.
I also tried to give a look at EventRenderer, but it seems that your stroybook is no longer found on github
Fixed!
Fixed on v3.4.1, without changing code. It was just type-changed.
@nicolas-chalant Can you try the new version? It might work only on the Web platform. Thanks
Thanks for the update, I'm checking it !
With the storybook I reached my goal ! Thanks again for your help.
I did not need the style array actually, but I tried it and it seems to work.
For those wondering, I used a customize event with a color prop and add those lines in the calendar :
eventCellStyle={(event) => {
const backgroundColor = event.color
return { backgroundColor }
}}
Hello @acro5piano,
On my previous answer on the #823 issue, I tried to change the style with the prop eventCellStyle, which worked, but it changed all events colors at the same time. My goal is to have different colors based on the type of the event.
I have a function that returns the style based on the type, but eventCellStyle takes only one style, right ? I cannot give it an array (or a prop color on each event) that could take multiple styles in order to have a specific style on an event, or am I missing something ?
I also tried to give a look at EventRenderer, but it seems that your stroybook is no longer found on github https://github.com/acro5piano/react-native-big-calendar/blob/main/stories/index.stories.tsx