import React, { Component } from "react";
import { ScrollView, StyleSheet, View } from "react-native";
import HTML from "react-native-render-html"; //渲染html成原生內容
export default class Details extends Component {
? constructor(props) {
? ? super(props);
? }
? render() {
? ? var content = this.props.navigation.getParam("abc", 123);
? ? return (
? ? ? <View style={styles.container}>
? ? ? ? <ScrollView style={{ flex: 1 }}>
? ? ? ? ? <HTML html={content} />
? ? ? ? </ScrollView>
? ? ? </View>
? ? );
? }
}
const styles = StyleSheet.create({
? container: {
? ? flex: 1,
? ? backgroundColor: "#F5FCFF"
? },
? welcome: {
? ? fontSize: 20,
? ? textAlign: "center",
? ? margin: 10,
? ? flexDirection: "row"
? }
});