import { StyleSheet, View } from "react-native";

import { GradientBorderView } from "../GradientBorderView";

const BorderGradient = ({
  children,
  contentContainerStyle,
  gradientProps,
  ...props
}) => {
  return (
    <GradientBorderView
      gradientProps={{
        start: { x: 0, y: 0 },
        end: { x: 1, y: 0 },
        ...gradientProps,
      }}
      {...props}
    >
      <View
        style={{
          ...styles.innerContainer,
          ...contentContainerStyle,
        }}
      >
        {children}
      </View>
    </GradientBorderView>
  );
};

export default BorderGradient;

const styles = StyleSheet.create({
  innerContainer: {
    flex: 1,
  },
});
