import { ContentPadding } from "@/constants/theme";
import { forwardRef } from "react";
import { ScrollView, ScrollViewProps, StyleSheet } from "react-native";

interface ContentProps extends ScrollViewProps {
  children?: React.ReactNode;
}

const Content = forwardRef<ScrollView, ContentProps>(({ children, ...rest }, ref) => {
  return (
    <ScrollView ref={ref} style={styles.content} {...rest}>
      {children}
    </ScrollView>
  );
});

Content.displayName = "Content";

const styles = StyleSheet.create({
  content: {
    padding: ContentPadding
  }
});

export default Content;