UNPKG

fleetback-camera-roll-picker

Version:

A React Native component providing images selection from camera roll

46 lines (43 loc) 1.63 kB
import React from 'react'; import {PhotoIdentifier, AssetType} from "@react-native-community/cameraroll"; import { TextStyle, ViewStyle } from 'react-native'; export type GroupTypes = 'Album' | 'All' | 'Event' | 'Faces' |'Library' | 'PhotoStream' | 'SavedPhotos'; export type MediaImport = { /** Only set if the `include` parameter contains `filename`. */ filename: string | null; uri: string; /** Only set if the `include` parameter contains `imageSize`. */ height: number; /** Only set if the `include` parameter contains `imageSize`. */ width: number; /** Only set if the `include` parameter contains `fileSize`. */ fileSize: number | null; /** * Only set if the `include` parameter contains `playableDuration`. * Will be null for images. */ playableDuration: number | null; } export type Props = { PHPhotoLibraryPreventAutomaticLimitedAccessAlert: boolean, initialNumToRender?: number, groupTypes: GroupTypes, maximum?: number, assetType?: AssetType, assetFilter:(photos: PhotoIdentifier) => void, selectSingleItem?: boolean, imagesPerRow: number, imageMargin: number, callback: (selected: MediaImport[], image: MediaImport) => void, selected: MediaImport[], selectedMarker?: JSX.Element, backgroundColor: string, emptyText: string, emptyTextStyle: TextStyle, limitedAccessText: string, limitedAccessRefreshText?: string, limitedTextStyle: TextStyle, loader?: JSX.Element, contentContainerStyle: ViewStyle, } export default class CameraRollPicker extends React.Component<Props> {}