Skip to content

Commit cbed39c

Browse files
authored
Merge pull request #1914 from wix/feat/ExpandableCalendar_knob_color
App style - Add support for ExpandableCalendar's knob color
2 parents c7dae88 + ad88e58 commit cbed39c

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

example/src/screens/expandableCalendarScreen.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,21 +122,23 @@ function getTheme() {
122122
// arrows
123123
arrowColor: 'black',
124124
arrowStyle: {padding: 0},
125+
// knob
126+
expandableKnobColor: themeColor,
125127
// month
126128
monthTextColor: 'black',
127129
textMonthFontSize: 16,
128130
textMonthFontFamily: 'HelveticaNeue',
129-
textMonthFontWeight: 'bold',
131+
textMonthFontWeight: 'bold' as 'bold',
130132
// day names
131133
textSectionTitleColor: 'black',
132134
textDayHeaderFontSize: 12,
133135
textDayHeaderFontFamily: 'HelveticaNeue',
134-
textDayHeaderFontWeight: 'normal',
136+
textDayHeaderFontWeight: 'normal' as 'normal',
135137
// dates
136138
dayTextColor: themeColor,
137139
textDayFontSize: 18,
138140
textDayFontFamily: 'HelveticaNeue',
139-
textDayFontWeight: '500',
141+
textDayFontWeight: '500' as '500',
140142
textDayStyle: {marginTop: Platform.OS === 'android' ? 2 : 4},
141143
// selected date
142144
selectedDayBackgroundColor: themeColor,
@@ -186,7 +188,7 @@ export default class ExpandableCalendarScreen extends Component<Props> {
186188
onMonthChange={this.onMonthChange}
187189
showTodayButton
188190
disabledOpacity={0.6}
189-
// theme={this.todayBtnTheme}
191+
theme={this.todayBtnTheme}
190192
// todayBottomMargin={16}
191193
>
192194
{this.props.weekView ? (
@@ -202,7 +204,7 @@ export default class ExpandableCalendarScreen extends Component<Props> {
202204
// calendarStyle={styles.calendar}
203205
// headerStyle={styles.calendar} // for horizontal only
204206
// disableWeekScroll
205-
// theme={this.theme}
207+
theme={this.theme}
206208
// disableAllTouchEventsForDisabledDays
207209
firstDay={1}
208210
markedDates={this.marked}

src/expandableCalendar/style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default function styleConstructor(theme: Theme = {}) {
4747
width: 40,
4848
height: 4,
4949
borderRadius: 3,
50-
backgroundColor: '#e8ecf0'
50+
backgroundColor: appStyle.expandableKnobColor
5151
},
5252
sectionText: {
5353
fontWeight: 'bold',

src/style.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const agendaDayTextColor = '#7a92a5';
5353
export const agendaDayNumColor = '#7a92a5';
5454
export const agendaTodayColor = textLinkColor;
5555
export const agendaKnobColor = '#f2F4f5';
56+
export const expandableKnobColor = '#e8ecf0';
5657
export const todayButtonTextColor = textLinkColor;
5758
export const todayButtonPosition = undefined; // right' / 'left'(default)
5859

0 commit comments

Comments
 (0)