Skip to content

Commit dec191f

Browse files
committed
refactor: export types from the main entry instead of /types
1 parent f295272 commit dec191f

29 files changed

+64
-43
lines changed

example/.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"extends": "../.eslintrc",
33

44
"settings": {
5-
"import/core-modules": [ "react-native-paper", "react-native-paper/types" ]
5+
"import/core-modules": [ "react-native-paper" ]
66
},
77

88
"rules": {

example/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import {
77
Provider as PaperProvider,
88
DarkTheme,
99
DefaultTheme,
10+
type Theme,
1011
} from 'react-native-paper';
1112
import createReactContext from 'create-react-context';
1213
import { createDrawerNavigator } from 'react-navigation';
1314
import RootNavigator from './src/RootNavigator';
1415
import DrawerItems from './DrawerItems';
15-
import type { Theme } from 'react-native-paper/types';
1616

1717
type State = {
1818
theme: Theme,

example/DrawerItems.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
TouchableRipple,
1010
Text,
1111
Colors,
12+
type Theme,
1213
} from 'react-native-paper';
13-
import type { Theme } from 'react-native-paper/types';
1414

1515
type Props = {
1616
theme: Theme,

example/babel.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module.exports = {
66
{
77
alias: {
88
'react-native-paper': '../src/index',
9-
'react-native-paper/types': '../types',
109
'react-native-vector-icons': '@expo/vector-icons',
1110
},
1211
},

example/src/AppbarExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
Switch,
1010
Paragraph,
1111
withTheme,
12+
type Theme,
1213
} from 'react-native-paper';
13-
import type { Theme } from 'react-native-paper/types';
1414

1515
type Props = {
1616
navigation: any,

example/src/BannerExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import {
88
ScrollView,
99
SafeAreaView,
1010
Dimensions,
11+
type Theme,
1112
} from 'react-native';
1213
import { Banner, withTheme, FAB } from 'react-native-paper';
13-
import type { Theme } from 'react-native-paper/types';
1414

1515
type Props = {
1616
theme: Theme,

example/src/ButtonExample.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
import * as React from 'react';
44
import { View, ScrollView, StyleSheet, Image } from 'react-native';
5-
import { Button, List, withTheme } from 'react-native-paper';
6-
import type { Theme } from 'react-native-paper/types';
5+
import { Button, List, withTheme, type Theme } from 'react-native-paper';
76

87
type Props = {
98
theme: Theme,

example/src/CardExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99
Card,
1010
Button,
1111
withTheme,
12+
type Theme,
1213
} from 'react-native-paper';
13-
import type { Theme } from 'react-native-paper/types';
1414

1515
type Props = {
1616
theme: Theme,

example/src/CheckboxExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import {
88
Colors,
99
TouchableRipple,
1010
withTheme,
11+
type Theme,
1112
} from 'react-native-paper';
12-
import type { Theme } from 'react-native-paper/types';
1313

1414
type Props = {
1515
theme: Theme,

example/src/ChipExample.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
import * as React from 'react';
44
import { View, ScrollView, StyleSheet, Image } from 'react-native';
5-
import { Chip, List, withTheme } from 'react-native-paper';
6-
import type { Theme } from 'react-native-paper/types';
5+
import { Chip, List, withTheme, type Theme } from 'react-native-paper';
76

87
type Props = {
98
theme: Theme,

0 commit comments

Comments
 (0)