import { useContext } from "react";
import { View } from "react-native";
import { AppContext } from "../../utils";

export function Divider({ style, withoutMarginVertical }) {
  const appContext = useContext(AppContext);

  return (
    <View
      style={[
        style,
        {
          height: 1,
          backgroundColor: appContext.appTheme.divider,
        },
        !withoutMarginVertical && { marginVertical: 10 },
      ]}
    />
  );
}
