Skip to content

Commit

Permalink
Merge pull request #366 from yngfoxx/master
Browse files Browse the repository at this point in the history
fix: validateDOMNesting
  • Loading branch information
RichardLindhout authored Jan 30, 2024
2 parents 8d6791d + ea6ab90 commit 00c7b57
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions src/Date/Month.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as React from 'react'
import { StyleSheet, View } from 'react-native'
import {
IconButton,
Text,
useTheme,
TouchableRipple,
MD2Theme,
Icon,
} from 'react-native-paper'
import Day, { EmptyDay } from './Day'

Expand Down Expand Up @@ -302,18 +302,25 @@ 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={[
styles.iconWrapper,
isHorizontal ? styles.opacity1 : styles.opacity0

Check failure on line 308 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `,`
]}
>
<Icon
size={24}
color={theme.isV3

Check failure on line 313 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎··················`
? theme.colors.onSurfaceVariant

Check failure on line 314 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
: theme.colors.onSurface

Check failure on line 315 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
}
source={selectingYear

Check failure on line 317 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `⏎··················`
? theme.isV3

Check failure on line 318 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
? 'menu-up'

Check failure on line 319 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
: 'chevron-up'

Check failure on line 320 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
: theme.isV3

Check failure on line 321 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
? 'menu-down'

Check failure on line 322 in src/Date/Month.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
: 'chevron-down'
}
/>
</View>
Expand Down Expand Up @@ -362,6 +369,9 @@ export const monthHeaderSingleHeight =
monthHeaderSingleMarginTop + monthHeaderSingleMarginBottom

const styles = StyleSheet.create({
iconWrapper: {
padding: 8
},
week: {
flexDirection: 'row',
marginBottom: weekMargin,
Expand Down

0 comments on commit 00c7b57

Please sign in to comment.