Skip to content

Commit 6bfbf70

Browse files
angelakimattlewis92
authored andcommitted
feat: add secondaryText to event colors that you can use to customise week and day view event text
Closes #1375
1 parent 9399d12 commit 6bfbf70

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

projects/angular-calendar/src/modules/week/calendar-week-view-event.component.ts

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { PlacementArray } from 'positioning';
3030
<div
3131
class="cal-event"
3232
[ngStyle]="{
33+
color: weekEvent.event.color?.secondaryText,
3334
backgroundColor: weekEvent.event.color?.secondary,
3435
borderColor: weekEvent.event.color?.primary
3536
}"

projects/demos/app/demo-modules/group-similar-events/template.html

+1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
[disablePopover]="!weekEvent.event.meta.groupedEvents"
4949
class="cal-event"
5050
[ngStyle]="{
51+
color: weekEvent.event.color?.secondaryText,
5152
backgroundColor: weekEvent.event.color?.secondary,
5253
borderColor: weekEvent.event.color?.primary
5354
}"

projects/demos/app/demo-modules/kitchen-sink/template.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ <h3>
108108
<tr>
109109
<th>Title</th>
110110
<th>Primary color</th>
111-
<th>Secondary color</th>
111+
<th>Secondary + text color</th>
112112
<th>Starts at</th>
113113
<th>Ends at</th>
114114
<th>Remove</th>
@@ -138,6 +138,12 @@ <h3>
138138
[(ngModel)]="event.color.secondary"
139139
(change)="refresh.next()"
140140
/>
141+
<input
142+
type="color"
143+
[ngModel]="event.color.secondaryText ?? '#1e90ff'"
144+
(ngModelChange)="event.color.secondaryText = $event"
145+
(change)="refresh.next()"
146+
/>
141147
</td>
142148
<td>
143149
<input

0 commit comments

Comments
 (0)