Skip to content

Commit c8e9a5d

Browse files
fix: upgrade version
1 parent b6abacd commit c8e9a5d

File tree

6 files changed

+1995
-2685
lines changed

6 files changed

+1995
-2685
lines changed

example/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"web:build": "react-app-rewired build",
1212
"web:test": "react-app-rewired test",
1313
"web:eject": "react-app-rewired eject",
14-
"web": "npm link ../node_modules/react --legacy-peer-deps --force && react-app-rewired start"
14+
"bugfix": "npm link ../node_modules/react --legacy-peer-deps --force",
15+
"web": "react-app-rewired start"
1516
},
1617
"dependencies": {
1718
"@formatjs/intl-datetimeformat": "^2.6.6",
@@ -22,14 +23,14 @@
2223
"@formatjs/intl-numberformat": "^5.6.1",
2324
"@formatjs/intl-pluralrules": "^3.4.6",
2425
"@formatjs/intl-relativetimeformat": "^7.2.6",
25-
"react": "^16.14.0",
26-
"react-dom": "^16.14.0",
26+
"react": "^17.0.1",
27+
"react-dom": "^17.0.1",
2728
"react-native": "0.63.4",
2829
"react-native-localize": "^2.0.1",
29-
"react-native-paper": "^4.5.0",
30+
"react-native-paper": "^4.7.2",
3031
"react-native-vector-icons": "https://github.com/RichardLindhout/react-native-vector-icons",
3132
"react-native-web": "^0.15.0",
32-
"react-scripts": "3.4.3"
33+
"react-scripts": "^4.0.3"
3334
},
3435
"devDependencies": {
3536
"@babel/core": "^7.11.4",
@@ -47,7 +48,7 @@
4748
"metro-react-native-babel-preset": "^0.63.0",
4849
"react-app-rewired": "^2.1.6",
4950
"react-test-renderer": "16.13.1",
50-
"typescript": "^4.1.0"
51+
"typescript": "^4.2.3"
5152
},
5253
"jest": {
5354
"preset": "react-native"

example/src/AppInner.tsx

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
Button,
1616
Text,
1717
Provider as PaperProvider,
18-
Switch,
18+
// Switch,
1919
DefaultTheme,
2020
DarkTheme,
2121
useTheme,
@@ -32,7 +32,7 @@ import {
3232
} from 'react-native-paper-dates';
3333

3434
function AppInner({
35-
onToggleDarkMode,
35+
// onToggleDarkMode,
3636
dark,
3737
}: {
3838
onToggleDarkMode: () => any;
@@ -142,7 +142,10 @@ function AppInner({
142142
>
143143
<View style={styles.content}>
144144
<View style={styles.titleContainer}>
145-
<Image source={require('./schedule.png')} style={styles.logo} />
145+
<Image
146+
source={require('./schedule.png').default}
147+
style={styles.logo}
148+
/>
146149
<Title>react-native-paper-dates</Title>
147150
</View>
148151

@@ -156,7 +159,7 @@ function AppInner({
156159
webRidge
157160
</Text>
158161
</Paragraph>
159-
<Paragraph>Example version: 0.4.0</Paragraph>
162+
<Paragraph>Example version: 0.4.1</Paragraph>
160163
</View>
161164
<View style={styles.content}>
162165
<Button
@@ -184,17 +187,17 @@ function AppInner({
184187
},
185188
]}
186189
>
187-
<View style={styles.switchContainer}>
188-
<Text style={[styles.switchLabel, { ...theme.fonts.medium }]}>
189-
Dark mode
190-
</Text>
191-
<View style={styles.switchSpace} />
192-
<Switch value={dark} onValueChange={onToggleDarkMode} />
193-
</View>
194-
<Enter />
195-
<Enter />
196-
<Enter />
197-
<Enter />
190+
{/*<View style={styles.switchContainer}>*/}
191+
{/* <Text style={[styles.switchLabel, { ...theme.fonts.medium }]}>*/}
192+
{/* Dark mode (does not wo*/}
193+
{/* </Text>*/}
194+
{/* <View style={styles.switchSpace} />*/}
195+
{/* <Switch value={dark} onValueChange={onToggleDarkMode} />*/}
196+
{/*</View>*/}
197+
{/*<Enter />*/}
198+
{/*<Enter />*/}
199+
{/*<Enter />*/}
200+
{/*<Enter />*/}
198201
<View>
199202
<Row>
200203
<Label>Date</Label>
@@ -221,9 +224,9 @@ function AppInner({
221224
<Label>Dates</Label>
222225
<Text>
223226
{dates
224-
?.map((date) => date && dateFormatter.format(date))
227+
?.map((d) => dateFormatter.format(d))
225228
.filter(Boolean)
226-
.join(', ') ?? '-'}
229+
.join(', ') || '-'}
227230
</Text>
228231
</Row>
229232
</View>
@@ -413,7 +416,10 @@ export default function AppWithProviders() {
413416
<style type="text/css">{`
414417
@font-face {
415418
font-family: 'MaterialCommunityIcons';
416-
src: url(${require('react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf')}) format('truetype');
419+
src: url(${
420+
require('react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf')
421+
.default
422+
}) format('truetype');
417423
}
418424
`}</style>
419425
) : null}

example/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"resolveJsonModule": true,
1818
"isolatedModules": true,
1919
"noEmit": true,
20-
"jsx": "react"
20+
"jsx": "react-jsx",
21+
"noFallthroughCasesInSwitch": true
2122
},
2223
"include": [
2324
"src"

0 commit comments

Comments
 (0)