Skip to content

Commit

Permalink
fix: validateDomNesting web-ridge#323
Browse files Browse the repository at this point in the history
Replaced IconButton with Icon component
  • Loading branch information
yngfoxx authored Jan 13, 2024
1 parent 8d6791d commit 4204a15
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/Date/Month.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
useTheme,
TouchableRipple,
MD2Theme,
Icon,
} from 'react-native-paper'
import Day, { EmptyDay } from './Day'

Expand Down Expand Up @@ -302,18 +303,23 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
>
{monthName} {year}
</Text>
<View style={isHorizontal ? styles.opacity1 : styles.opacity0}>
<IconButton
onPress={isHorizontal ? () => onPressYear(year) : undefined}
disabled
icon={
selectingYear
? theme.isV3
? 'menu-up'
: 'chevron-up'
: theme.isV3
? 'menu-down'
: 'chevron-down'
<View style={{
...(isHorizontal ? styles.opacity1 : styles.opacity0),
padding: 8,
}}>
<Icon
size={24}
color={theme.isV3
? theme.colors.onSurfaceVariant
: theme.colors.onSurface
}
source={selectingYear
? theme.isV3
? 'menu-up'
: 'chevron-up'
: theme.isV3
? 'menu-down'
: 'chevron-down'
}
/>
</View>
Expand Down

0 comments on commit 4204a15

Please sign in to comment.