react-native-modern-elements
Version:
A modern, customizable UI component library for React Native
20 lines (19 loc) • 685 B
JavaScript
import React, { memo } from "react";
import { View } from "react-native";
const Divider = ({ width = "90%", height = 1, bg = "gray", mt, mb, m, my, mx, align, dividerStyle = "solid", // ✅ default solid
}) => {
return (React.createElement(View, { style: {
width: width,
height: height,
borderBottomWidth: height, // ✅ use borderBottom instead of bg
borderColor: bg,
borderStyle: dividerStyle,
marginTop: mt,
marginBottom: mb,
margin: m,
marginVertical: my,
marginHorizontal: mx,
alignSelf: align,
} }));
};
export default memo(Divider);