react-native-surveys
Version:
Build your own forms, surveys and polls for your React Native apps.
56 lines (55 loc) • 1.15 kB
JavaScript
import React from "react";
import { View, Text, StyleSheet, Platform } from "react-native";
import { colors } from "../theme";
import { ErrorIcon } from "../assets/icons";
export const LoadingError = ({ iframe, error }) => {
const style = {
height: Platform.OS === "web" ? (iframe ? "100%" : "100vh") : "100%"
};
return React.createElement(
View,
{
style: [style, styles.container]
},
React.createElement(ErrorIcon, null),
React.createElement(
Text,
{
style: styles.header
},
"Ooops"
),
React.createElement(
Text,
{
style: styles.description
},
error
)
);
};
const styles = StyleSheet.create({
container: {
display: "flex",
alignItems: "center",
justifyContent: "center",
paddingVertical: 60,
width: "100%"
},
header: {
fontSize: 18,
lineHeight: 24,
color: colors.primary,
paddingTop: 16,
paddingBottom: 8,
textAlign: "center",
fontWeight: "bold"
},
description: {
fontSize: 16,
lineHeight: 24,
color: colors.primary,
textAlign: "center",
maxWidth: 200
}
});