11import * as React from 'react'
22import { I18nManager , StyleSheet , View } from 'react-native'
3- import { IconButton , Text } from 'react-native-paper'
3+ import { IconButton , Text , useTheme , TouchableRipple } from 'react-native-paper'
44import Day , { EmptyDay } from './Day'
5- import fonts from '../fonts'
5+
66import {
77 addMonths ,
88 areDatesOnSameDay ,
@@ -13,7 +13,6 @@ import {
1313 gridCounts ,
1414 isDateBetween ,
1515} from './utils'
16- import TouchableRipple from '../TouchableRipple'
1716import { getCalendarHeaderHeight } from './CalendarHeader'
1817
1918interface BaseMonthProps {
@@ -96,6 +95,7 @@ function Month({
9695 selectColor,
9796 roundness,
9897} : MonthSingleProps | MonthRangeProps ) {
98+ const theme = useTheme ( )
9999 const realIndex = getRealIndex ( index )
100100 const isHorizontal = scrollMode === 'horizontal'
101101
@@ -182,7 +182,7 @@ function Month({
182182 marginTop : monthHeaderSingleMarginTop ,
183183 marginBottom : monthHeaderSingleMarginBottom ,
184184 }
185- : { } ,
185+ : null ,
186186 ] }
187187 >
188188 < TouchableRipple
@@ -203,7 +203,7 @@ function Month({
203203 } ,
204204 ] }
205205 >
206- < Text style = { styles . monthLabel } >
206+ < Text style = { [ styles . monthLabel , theme . fonts . medium ] } >
207207 { monthName } { year }
208208 </ Text >
209209 < View style = { isHorizontal ? styles . opacity1 : styles . opacity0 } >
@@ -269,7 +269,7 @@ const styles = StyleSheet.create({
269269 justifyContent : 'center' ,
270270 overflow : 'hidden' ,
271271 } ,
272- monthLabel : { fontSize : 14 , ... fonts . medium , opacity : 0.7 } ,
272+ monthLabel : { fontSize : 14 , opacity : 0.7 } ,
273273 yearButton : { alignSelf : 'flex-start' , marginLeft : 6 } ,
274274 yearButtonInner : {
275275 paddingLeft : 16 ,
0 commit comments