Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.7 kB
3
Indexable
Never
import React from 'react';
import { StyleSheet } from 'react-native';
import { Image, View, Text, BorderRadiuses } from 'react-native-ui-lib';
import { useColors } from '../../hooks/useColors';
import { lightTheme } from '../../themes/schemes';
import lightColors from '../../themes/lightColors';

function FeedComponents({ image, title, children }:any) {
  const { colors } = useColors();
  return (
    <>
      <View style={styles.box} backgroundColor={lightColors.orangeLight}>
        <View marginR-10>
          <Image width={60} height={60} source={image} />
          {/* icon eklenecek */}
        </View>
        <View style={styles.titleContainer}>
          <Text style={styles.title}>{title}</Text>
          {children}
        </View>
      </View>
      <View style={styles.footer}>
        <Text>12.05.2023</Text>
        <Text>Kalp</Text>
      </View>
    </>
  );
}

const styles = StyleSheet.create({
  footer: {
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
    backgroundColor: lightColors.white64Light,
    flex: 0.05,
    paddingHorizontal: 15,
  },
  box: {
    backgroundColor: lightTheme.colors.login,
    width: '100%',
    height: 60,
    flexDirection: 'row',
    alignItems: 'center',
    justifyContent:'space-between',
    borderRadius: 5,
    paddingLeft: 20,
    paddingRight: 20,
  },
  imageContainer: {
    marginRight: 10,
  },
  image: {
    width: 60,
    height: 60,
    resizeMode: 'contain'
  },
  titleContainer: {
    right: 35,
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center'
  },
  title: {
    fontSize: 22,
  }
});

export default FeedComponents;