You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
867 B

import React from "react";
import { View, Text, Image, Dimensions, TouchableOpacity } from "react-native";
import tw from "tailwind-rn";
import * as OpenAnything from 'react-native-openanything';
import pdfIcon from "../../../assets/icons/pdf.png";
const { width } = Dimensions.get("window");
export default function PDF({ data }) {
return (
<TouchableOpacity
style={tw(
"w-full flex-row-reverse justify-between items-center rounded-md bg-red-100 py-3 px-2 mt-5"
)}
onPress={() => OpenAnything.Pdf(`https://dnvn.ir/api/v1/file/${data.fileIds}`)}
>
<Text
style={[
tw("text-right text-red-900"),
{ fontSize: width / 34, fontFamily: "regular" },
]}
>
{data.name}
</Text>
<Image source={pdfIcon} style={{ width: 40, height: 40 }} />
</TouchableOpacity>
);
}