Skip to content

Commit 4204a15

Browse files
authored
fix: validateDomNesting #323
Replaced IconButton with Icon component
1 parent 8d6791d commit 4204a15

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

src/Date/Month.tsx

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
useTheme,
77
TouchableRipple,
88
MD2Theme,
9+
Icon,
910
} from 'react-native-paper'
1011
import Day, { EmptyDay } from './Day'
1112

@@ -302,18 +303,23 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
302303
>
303304
{monthName} {year}
304305
</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'
306+
<View style={{
307+
...(isHorizontal ? styles.opacity1 : styles.opacity0),
308+
padding: 8,
309+
}}>
310+
<Icon
311+
size={24}
312+
color={theme.isV3
313+
? theme.colors.onSurfaceVariant
314+
: theme.colors.onSurface
315+
}
316+
source={selectingYear
317+
? theme.isV3
318+
? 'menu-up'
319+
: 'chevron-up'
320+
: theme.isV3
321+
? 'menu-down'
322+
: 'chevron-down'
317323
}
318324
/>
319325
</View>

0 commit comments

Comments
 (0)