@up-group-ui/react-controls
Version:
Up shared react controls
27 lines (26 loc) • 932 B
TypeScript
import { CustomStyles, WithThemeProps } from '../../../Common/theming/types';
export declare type UpPictureCustomStylesKeys = 'cameraWrapper' | 'pictureWrapper';
export declare type UpPictureCustomStyles = CustomStyles<UpPictureCustomStylesKeys, Partial<UpPictureProps>, UpPictureState>;
export declare type LabelsPictureKeys = 'activation' | 'takePicture' | 'noCameraSupported';
export declare type LabelsPicture = {
[key in LabelsPictureKeys]: string;
};
export declare type Image = {
data: string;
width: number;
height: number;
};
export interface UpPictureProps extends WithThemeProps {
width?: number;
height?: number;
labels?: LabelsPicture;
customStyles?: UpPictureCustomStyles;
onChange?: (event: any, value: Image) => void;
name?: string;
}
export interface UpPictureState {
enableVideo?: boolean;
supportsCamera?: boolean;
image?: Image;
isCameraReady?: boolean;
}