Skip to content

Commit 00c7b57

Browse files
Merge pull request #366 from yngfoxx/master
fix: validateDOMNesting
2 parents 8d6791d + ea6ab90 commit 00c7b57

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

src/Date/Month.tsx

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import * as React from 'react'
22
import { StyleSheet, View } from 'react-native'
33
import {
4-
IconButton,
54
Text,
65
useTheme,
76
TouchableRipple,
87
MD2Theme,
8+
Icon,
99
} from 'react-native-paper'
1010
import Day, { EmptyDay } from './Day'
1111

@@ -302,18 +302,25 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
302302
>
303303
{monthName} {year}
304304
</Text>
305-
<View style={isHorizontal ? styles.opacity1 : styles.opacity0}>
306-
<IconButton
307-
onPress={isHorizontal ? () => onPressYear(year) : undefined}
308-
disabled
309-
icon={
310-
selectingYear
311-
? theme.isV3
312-
? 'menu-up'
313-
: 'chevron-up'
314-
: theme.isV3
315-
? 'menu-down'
316-
: 'chevron-down'
305+
<View
306+
style={[
307+
styles.iconWrapper,
308+
isHorizontal ? styles.opacity1 : styles.opacity0
309+
]}
310+
>
311+
<Icon
312+
size={24}
313+
color={theme.isV3
314+
? theme.colors.onSurfaceVariant
315+
: theme.colors.onSurface
316+
}
317+
source={selectingYear
318+
? theme.isV3
319+
? 'menu-up'
320+
: 'chevron-up'
321+
: theme.isV3
322+
? 'menu-down'
323+
: 'chevron-down'
317324
}
318325
/>
319326
</View>
@@ -362,6 +369,9 @@ export const monthHeaderSingleHeight =
362369
monthHeaderSingleMarginTop + monthHeaderSingleMarginBottom
363370

364371
const styles = StyleSheet.create({
372+
iconWrapper: {
373+
padding: 8
374+
},
365375
week: {
366376
flexDirection: 'row',
367377
marginBottom: weekMargin,

0 commit comments

Comments
 (0)