2026-07-02 14:34:19 +05:30

32 lines
620 B
TypeScript

import React from 'react';
import { View, ViewStyle } from 'react-native';
import { useAppTheme } from '@theme';
import { getStyles } from './divider.styles';
interface DividerProps {
color?: string;
thickness?: number;
style?: ViewStyle;
}
export const Divider: React.FC<DividerProps> = ({
color,
thickness = 1,
style,
}) => {
const { colors } = useAppTheme();
const styles = getStyles(colors);
return (
<View
style={[
styles.divider,
{ height: thickness },
color ? { backgroundColor: color } : null,
style,
]}
/>
);
};
export default Divider;