Skip to content
Snippets Groups Projects
JsonLdRawViewer.tsx 835 B
Newer Older
  • Learn to ignore specific revisions
  • import React from 'react';
    import {View, Text, StyleSheet} from 'react-native';
    import {ColorPallet, TextTheme} from 'src/theme/theme';
    
    type LegalParticipantProps = {
      jsonld: any;
    };
    
    const JsonLdRawViewer: React.FC<LegalParticipantProps> = ({
      jsonld,
    }) => {
      return (
        <View>
          <Text style={styles.header}>Raw JSON-LD:</Text>
          <View style={styles.json}>
            <Text style={styles.jsonValue}>
              {JSON.stringify(jsonld, null, 2)}
            </Text>
          </View>
        </View>
      );
    };
    
    export default JsonLdRawViewer;
    
    const styles = StyleSheet.create({
      header: {
        ...TextTheme.normal,
        color: ColorPallet.baseColors.black,
        fontWeight: 'bold',
        marginBottom: 8,
      },
      json: {
        paddingVertical: 16,
      },
      jsonValue: {
        ...TextTheme.normal,
        color: ColorPallet.baseColors.black,
      },
    });