mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-08 21:18:14 -05:00
added static require
This commit is contained in:
@@ -2,12 +2,15 @@
|
||||
|
||||
This project is made possible by the people and organizations listed in this document.
|
||||
|
||||
|
||||
## Contributors
|
||||
|
||||
<img src="docs/images/id_pass_logo.svg" width="150" height="50">
|
||||
|
||||
|
||||

|
||||
|
||||
[ID PASS](https://www.idpass.org/)
|
||||
|
||||
<img src="docs/images/newlogic_logo.svg" width="100" height="200">
|
||||

|
||||
|
||||
[Newlogic](https://www.newlogic.com/)
|
||||
|
||||
BIN
docs/images/id_pass_logo.png
Normal file
BIN
docs/images/id_pass_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
BIN
docs/images/newlogic_logo.png
Normal file
BIN
docs/images/newlogic_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -1,6 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Asset } from 'expo-asset';
|
||||
import { Dimensions, StyleSheet, View } from 'react-native';
|
||||
import { Dimensions, Image, StyleSheet, View } from 'react-native';
|
||||
import { Divider, Icon, ListItem, Overlay } from 'react-native-elements';
|
||||
import Markdown from 'react-native-simple-markdown'
|
||||
import { Button, Text, Column, Row } from '../../components/ui';
|
||||
@@ -10,7 +10,10 @@ const mdFile = require('../../Credits.md')
|
||||
export const Credits: React.FC<CreditsProps> = (props) => {
|
||||
const [isViewing, setIsViewing] = useState(false);
|
||||
const [content, setContent] = useState("");
|
||||
|
||||
const images = {
|
||||
'newlogic_logo.png' : require('../../docs/images/newlogic_logo.png'),
|
||||
'id_pass_logo.png' : require('../../docs/images/id_pass_logo.png'),
|
||||
}
|
||||
const styles = StyleSheet.create({
|
||||
buttonContainer: {
|
||||
position: 'absolute',
|
||||
@@ -29,6 +32,9 @@ export const Credits: React.FC<CreditsProps> = (props) => {
|
||||
const markdownStyles = {
|
||||
heading1: {
|
||||
fontSize: 24,
|
||||
},
|
||||
image: {
|
||||
maxWidth: 150
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +45,20 @@ export const Credits: React.FC<CreditsProps> = (props) => {
|
||||
setContent(file);
|
||||
}
|
||||
|
||||
const rules = {
|
||||
image: {
|
||||
react: (node, output, state) => (
|
||||
<View key={`image-${state.key}`}>
|
||||
<Image
|
||||
style={{ width: 150, height: 50 }}
|
||||
source={images[node.target]}
|
||||
resizeMode="contain"
|
||||
/>
|
||||
</View>
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
await fetchLocalFile();
|
||||
@@ -65,7 +85,10 @@ export const Credits: React.FC<CreditsProps> = (props) => {
|
||||
</Row>
|
||||
<Divider />
|
||||
<View style={styles.markdownView}>
|
||||
<Markdown children={content} />
|
||||
<Markdown
|
||||
rules={rules}
|
||||
children={content}
|
||||
styles={markdownStyles}/>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user