antoniandre / vue-cal

A Vue.js full calendar, no dependency, no BS. :metal:
https://antoniandre.github.io/vue-cal/
MIT License
1.23k stars 235 forks source link

Dynamic background color for splits #440

Open crisclacerda opened 2 years ago

crisclacerda commented 2 years ago

In the current implementation to define the background color for the split cells it is necessary to define astyle for it’s class on the CSS. I’ve found that this is not practical when the color is fetched from the back-end or need to change dynamically so I had to made this small change to be able to accomplish that.

Old behavior for setting the background color of a split:

In data..
splits: [
  { label: 'Whatever', class: 'split1' }
]
In CSS
.vuecal__body .split1 {background-color: rgba(226, 242, 253, 0.7);}

This PR:

splits: [
  { label: 'Whatever', color: 'rgba(226, 242, 253, 0.7)' }
]