@s20.ai/safecam-360-rn-lite
Version:
A React Native component to view the interior panorama and exterior 360 degree views of a product featuring suppport for hotspots. Compatible with Android and iOS
66 lines (64 loc) • 2.18 kB
JavaScript
/*
* Copyright © 2022 S20.AI India Pvt. Ltd.
* Contact - origin@s20.ai
* License - Licensed as per https://docs.s20.ai/license.html
*/
import React from 'react';
import {Provider} from 'react-redux';
import store from '../redux/store';
import MainWrapper from './MainWrapper';
export const wrapper = ({
interiorData,
exteriorData,
enableHotspots = true,
enableGalleryButton = false,
enableHotspotTooltip = false,
galleryButtonPressed,
enableBackButton = false,
backButtonPressed,
enableCarAutorotateOnCardSwipe = true,
enableCardSwipeOnCarRotation = true,
bottomToolbarButtonPressed,
bottomToolbarSwitchToggled,
hotspotPressed,
orientationChanged,
onInteraction,
customInteriorUrl = 'https://safecam360.s20.ai/interior-viewer',
presetOrientation,
customFontFamily = 'Helvetica',
exterior360ResizeMode = 'cover',
interior360InitialPosition = 180,
customGalleryButton,
customBackButton,
miniMode,
}) => {
return (
<Provider store={store}>
<MainWrapper
exteriorData={exteriorData}
interiorData={interiorData}
enableHotspots={enableHotspots}
enableGalleryButton={enableGalleryButton}
galleryButtonPressed={galleryButtonPressed}
enableHotspotTooltip={enableHotspotTooltip}
enableBackButton={enableBackButton}
backButtonPressed={backButtonPressed}
enableCarAutorotateOnCardSwipe={enableCarAutorotateOnCardSwipe}
enableCardSwipeOnCarRotation={enableCardSwipeOnCarRotation}
bottomToolbarButtonPressed={bottomToolbarButtonPressed}
bottomToolbarSwitchToggled={bottomToolbarSwitchToggled}
hotspotPressed={hotspotPressed}
orientationChanged={orientationChanged}
onInteraction={onInteraction}
customInteriorUrl={customInteriorUrl}
presetOrientation={presetOrientation}
customFontFamily={customFontFamily}
exterior360ResizeMode={exterior360ResizeMode}
interior360InitialPosition={interior360InitialPosition}
customGalleryButton={customGalleryButton}
customBackButton={customBackButton}
miniMode={miniMode}
/>
</Provider>
);
};