File tree Expand file tree Collapse file tree 5 files changed +33
-31
lines changed
Expand file tree Collapse file tree 5 files changed +33
-31
lines changed Original file line number Diff line number Diff line change 1+ export * from './src/ActionSheet' ;
2+ export * from './src/utils' ;
Original file line number Diff line number Diff line change 22 "name" : " react-native-actionsheet-cstm" ,
33 "version" : " 0.0.2" ,
44 "description" : " Custom ActionSheet for React Native" ,
5- "main" : " /src/ index.tsx" ,
5+ "main" : " index.tsx" ,
66 "scripts" : {
77 "test" : " echo \" Error: no test specified\" && exit 1"
88 },
Original file line number Diff line number Diff line change @@ -6,39 +6,11 @@ import {
66 View ,
77 Text ,
88 Animated ,
9- StyleProp ,
10- ViewStyle ,
119} from 'react-native' ;
1210
11+ import { ActionSheetProps } from './utils' ;
1312import st from './style' ;
1413
15- export interface ActionItem {
16- textStyle ?: StyleProp < ViewStyle > ;
17-
18- // Default Action Sheet Provided
19- text : string ;
20- onPress : ( ) => void ;
21- }
22-
23- export interface ActionSheetProps {
24- onShow ?: ( ) => void ;
25- onDismiss ?: ( ) => void ;
26- backdropStyle ?: StyleProp < ViewStyle > ;
27- containerStyle ?: StyleProp < ViewStyle > ;
28- titleContainerStyle ?: StyleProp < ViewStyle > ;
29- title ?: string ;
30- titleTextStyle ?: StyleProp < ViewStyle > ;
31- cancelButtonStyle ?: StyleProp < ViewStyle > ;
32- cancelText ?: string ;
33- cancelTextStyle ?: StyleProp < ViewStyle > ;
34- hiddeCancel ?: boolean ;
35-
36- // Default Action Sheet Provided
37- visible : boolean ;
38- onClose : ( ) => void ;
39- actionItems : Array < ActionItem > ;
40- }
41-
4214export const ActionSheet : React . FC < ActionSheetProps > = props => {
4315 const top = new Animated . Value ( 100 ) ;
4416 const hiddeCancel : boolean = props . hiddeCancel || false ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import { StyleProp , ViewStyle } from 'react-native' ;
3+
4+ export interface ActionItem {
5+ textStyle ?: StyleProp < ViewStyle > ;
6+
7+ // Default Action Sheet Provided
8+ text : string ;
9+ onPress : ( ) => void ;
10+ }
11+
12+ export interface ActionSheetProps {
13+ onShow ?: ( ) => void ;
14+ onDismiss ?: ( ) => void ;
15+ backdropStyle ?: StyleProp < ViewStyle > ;
16+ containerStyle ?: StyleProp < ViewStyle > ;
17+ titleContainerStyle ?: StyleProp < ViewStyle > ;
18+ title ?: string ;
19+ titleTextStyle ?: StyleProp < ViewStyle > ;
20+ cancelButtonStyle ?: StyleProp < ViewStyle > ;
21+ cancelText ?: string ;
22+ cancelTextStyle ?: StyleProp < ViewStyle > ;
23+ hiddeCancel ?: boolean ;
24+
25+ // Default Action Sheet Provided
26+ visible : boolean ;
27+ onClose : ( ) => void ;
28+ actionItems : Array < ActionItem > ;
29+ }
You can’t perform that action at this time.
0 commit comments