UNPKG

1.44 kBSource Map (JSON)View Raw
1{"version":3,"sources":["connectActionSheet.tsx"],"names":["hoistNonReactStatic","React","Consumer","connectActionSheet","WrappedComponent","ConnectedActionSheet","props","showActionSheetWithOptions"],"mappings":"yKAAA,MAAOA,CAAAA,mBAAP,KAAgC,yBAAhC,CACA,MAAO,GAAKC,CAAAA,KAAZ,KAAuB,OAAvB,CAEA,OAASC,QAAT,KAAyB,WAAzB,CAGA,cAAe,SAASC,CAAAA,kBAAT,CACbC,gBADa,CAEyC,CACtD,GAAMC,CAAAA,oBAAoB,CAAG,QAAvBA,CAAAA,oBAAuB,CAACC,KAAD,CAAqB,CAChD,MACE,qBAAC,QAAD,iEACG,cAAoC,IAAjCC,CAAAA,0BAAiC,MAAjCA,0BAAiC,CACnC,MACE,qBAAC,gBAAD,aAAsBD,KAAtB,EAA6B,0BAA0B,CAAEC,0BAAzD,kEADF,CAGD,CALH,CADF,CASD,CAVD,CAYA,MAAOP,CAAAA,mBAAmB,CAACK,oBAAD,CAAuBD,gBAAvB,CAA1B,CACD","sourcesContent":["import hoistNonReactStatic from 'hoist-non-react-statics';\nimport * as React from 'react';\n\nimport { Consumer } from './context';\nimport { ActionSheetProps } from './types';\n\nexport default function connectActionSheet<OwnProps = any>(\n WrappedComponent: React.ComponentType<OwnProps & ActionSheetProps>\n): React.FunctionComponent<OwnProps & ActionSheetProps> {\n const ConnectedActionSheet = (props: OwnProps) => {\n return (\n <Consumer>\n {({ showActionSheetWithOptions }) => {\n return (\n <WrappedComponent {...props} showActionSheetWithOptions={showActionSheetWithOptions} />\n );\n }}\n </Consumer>\n );\n };\n\n return hoistNonReactStatic(ConnectedActionSheet, WrappedComponent);\n}\n"]}
\No newline at end of file