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.
94 lines
3.0 KiB
94 lines
3.0 KiB
import React from 'react'; |
|
import {View, Text, Pressable, Image} from 'react-native'; |
|
import tw from 'tailwind-react-native-classnames'; |
|
|
|
export default function Table({array}) { |
|
return ( |
|
<View style={tw.style('flex flex-row-reverse w-full justify-between mt-4')}> |
|
<View style={tw.style('flex flex-col pl-2')}> |
|
<Text |
|
style={[ |
|
tw.style('flex text-right flex-3'), |
|
{ |
|
borderBottomWidth: 2, |
|
borderColor: '#777', |
|
}, |
|
]}> |
|
محصولات |
|
</Text> |
|
|
|
<View style={tw.style('flex flex-col')}> |
|
{array.map((item, i) => ( |
|
<View style={tw.style('py-3 flex flex-row-reverse')}> |
|
<Image |
|
source={{uri: 'https://dnvn.ir/api/v1/file/2016'}} |
|
style={[{width: 50, height: 80}, tw.style('rounded')]} |
|
/> |
|
<View style={[tw.style('flex flex-col pr-2')]}> |
|
<Text |
|
style={tw.style( |
|
'text-md font-bold text-right text-gray-500', |
|
)}> |
|
ریاضی هشتم |
|
</Text> |
|
<Text |
|
style={tw.style( |
|
'text-md text-green-500 text-right mt-1 font-normal', |
|
)}> |
|
پایه چهارم |
|
</Text> |
|
<Text |
|
style={tw.style( |
|
'text-xs text-blue-500 text-right mt-1 font-normal', |
|
)}> |
|
همراه با کد فعال سازی محتوای الکترونیک |
|
</Text> |
|
</View> |
|
</View> |
|
))} |
|
</View> |
|
</View> |
|
<View style={tw.style('flex flex-col')}> |
|
<Text |
|
style={[ |
|
tw.style('w-full text-right'), |
|
{ |
|
borderBottomWidth: 2, |
|
borderColor: '#777', |
|
}, |
|
]}> |
|
قیمت |
|
</Text> |
|
<View style={tw.style('flex flex-col')}> |
|
{array.map((item, i) => ( |
|
<View |
|
style={[tw.style('py-3 flex flex-col w-full'), {height: 105}]}> |
|
<Text style={tw.style('text-right text-md')}>265.000</Text> |
|
<Text |
|
style={[ |
|
tw.style('text-right font-normal text-gray-500'), |
|
{fontSize: 8}, |
|
]}> |
|
100.000 هزار تومان |
|
</Text> |
|
<View |
|
style={tw.style( |
|
'flex flex-row-reverse py-2 justify-around border border-gray-400 rounded-md mt-2 w-20', |
|
)}> |
|
<Pressable> |
|
<Text>+</Text> |
|
</Pressable> |
|
<Pressable> |
|
<Text>1</Text> |
|
</Pressable> |
|
<Pressable> |
|
<Text>-</Text> |
|
</Pressable> |
|
</View> |
|
</View> |
|
))} |
|
</View> |
|
</View> |
|
</View> |
|
); |
|
}
|
|
|