File tree Expand file tree Collapse file tree 8 files changed +37
-14
lines changed
example/storybook/stories/components Expand file tree Collapse file tree 8 files changed +37
-14
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,9 @@ const myTheme = extendTheme({
33
33
myBtn : {
34
34
padding : 10 ,
35
35
} ,
36
- myNewButton : ( { myPadding } : { myPadding : number } ) => {
36
+ myNewButton : ( { myPaddingX } : { myPaddingX : number } ) => {
37
37
return {
38
- padding : myPadding ,
38
+ padding : myPaddingX ,
39
39
} ;
40
40
} ,
41
41
} ,
@@ -115,6 +115,7 @@ export function RenderTestButton() {
115
115
return (
116
116
< Box style = { { position : 'absolute' , top : 10 , left : 20 } } m = { 2 } bg = "red.100" >
117
117
< Button
118
+ variant = { 'myNewButton' }
118
119
// title={state.toString()}
119
120
onPress = { ( ) => setState ( state + 1 ) }
120
121
/>
Original file line number Diff line number Diff line change 36
36
" prettier --write"
37
37
]
38
38
},
39
- "version" : " 3.3.8-alpha.6 " ,
39
+ "version" : " 3.3.8-alpha.7 " ,
40
40
"license" : " MIT" ,
41
41
"private" : false ,
42
42
"main" : " lib/commonjs/index" ,
Original file line number Diff line number Diff line change 1
1
import type { StyledProps } from '../../../theme/types' ;
2
2
import type { FlatListProps } from 'react-native' ;
3
- import type { PlatformProps } from '../../types' ;
3
+ import type { CustomProps , PlatformProps } from '../../types' ;
4
4
5
- export interface IFlatListProps < ItemT >
5
+ export interface InterfaceFlatListProps < ItemT >
6
6
extends FlatListProps < ItemT > ,
7
7
StyledProps ,
8
8
PlatformProps < IFlatListProps < ItemT > > {
@@ -11,3 +11,7 @@ export interface IFlatListProps<ItemT>
11
11
*/
12
12
_contentContainerStyle ?: IFlatListProps < ItemT > ;
13
13
}
14
+
15
+ export type IFlatListProps < ItemT > =
16
+ | InterfaceFlatListProps < ItemT >
17
+ | CustomProps < 'FlatList' > ;
Original file line number Diff line number Diff line change 1
1
import type { KeyboardAvoidingViewProps } from 'react-native' ;
2
2
import type { StyledProps } from '../../../theme/types' ;
3
- import type { PlatformProps } from '../../types' ;
3
+ import type { CustomProps , PlatformProps } from '../../types' ;
4
4
5
- export interface IKeyboardAvoidingViewProps
5
+ export interface InterfaceKeyboardAvoidingViewProps
6
6
extends KeyboardAvoidingViewProps ,
7
7
StyledProps ,
8
8
PlatformProps < IKeyboardAvoidingViewProps > {
9
9
/**
10
10
* Renders components as Box children. Accepts a JSX.Element or an array of JSX.Element. */
11
11
children ?: JSX . Element | JSX . Element [ ] | string | any ;
12
12
}
13
+
14
+ export type IKeyboardAvoidingViewProps =
15
+ | InterfaceKeyboardAvoidingViewProps
16
+ | CustomProps < 'KeyboardAvoidingView' > ;
Original file line number Diff line number Diff line change 1
1
import type { ScrollViewProps } from 'react-native' ;
2
2
import type { StyledProps } from '../../../theme/types' ;
3
- import type { PlatformProps } from '../../types' ;
3
+ import type { CustomProps , PlatformProps } from '../../types' ;
4
4
5
- export interface IScrollViewProps
5
+ export interface InterfaceScrollViewProps
6
6
extends ScrollViewProps ,
7
7
StyledProps ,
8
8
PlatformProps < IScrollViewProps > {
@@ -14,3 +14,7 @@ export interface IScrollViewProps
14
14
*/
15
15
_contentContainerStyle ?: IScrollViewProps ;
16
16
}
17
+
18
+ export type IScrollViewProps =
19
+ | InterfaceScrollViewProps
20
+ | CustomProps < 'ScrollView' > ;
Original file line number Diff line number Diff line change 1
1
import type { StyledProps } from '../../../theme/types' ;
2
2
import type { SectionListProps } from 'react-native' ;
3
- import type { PlatformProps } from '../../types' ;
3
+ import type { CustomProps , PlatformProps } from '../../types' ;
4
4
type DefaultSectionT = {
5
5
[ key : string ] : any ;
6
6
} ;
7
7
// TODO: any need to fixed
8
- export interface ISectionListProps < ItemT , sectionT = DefaultSectionT >
8
+ export interface InterfaceSectionListProps < ItemT , sectionT = DefaultSectionT >
9
9
extends SectionListProps < ItemT , sectionT > ,
10
10
StyledProps ,
11
11
PlatformProps < ISectionListProps < ItemT , sectionT > > { }
12
+
13
+ export type ISectionListProps < ItemT , sectionT = DefaultSectionT > =
14
+ | InterfaceSectionListProps < ItemT , sectionT >
15
+ | CustomProps < 'SectionList' > ;
Original file line number Diff line number Diff line change 1
1
import type { StatusBarProps } from 'react-native' ;
2
+ import type { CustomProps } from '../../../components/types' ;
2
3
3
- export interface IStatusBarProps extends StatusBarProps { }
4
+ export interface InterfaceStatusBarProps extends StatusBarProps { }
5
+ export type IStatusBarProps =
6
+ | InterfaceStatusBarProps
7
+ | CustomProps < 'StatusBar' > ;
Original file line number Diff line number Diff line change 1
1
import type { StyledProps } from '../../../theme/types' ;
2
2
import type { ViewProps } from 'react-native' ;
3
- import type { PlatformProps } from '../../types' ;
3
+ import type { CustomProps , PlatformProps } from '../../types' ;
4
4
5
- export interface IViewProps
5
+ export interface InterfaceViewProps
6
6
extends ViewProps ,
7
7
StyledProps ,
8
8
PlatformProps < IViewProps > {
9
9
/**
10
10
* Renders components as Box children. Accepts a JSX.Element or an array of JSX.Element. */
11
11
children ?: JSX . Element | JSX . Element [ ] | string | any ;
12
12
}
13
+
14
+ export type IViewProps = InterfaceViewProps | CustomProps < 'View' > ;
You can’t perform that action at this time.
0 commit comments