Add Sign in with Apple sorta
This commit is contained in:
37
components/theme/ui/ThemedDivider.tsx
Normal file
37
components/theme/ui/ThemedDivider.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import React from 'react';
|
||||
import { StyleSheet, ViewProps, View, DimensionValue } from 'react-native';
|
||||
import { Colors } from '@/constants/Colors';
|
||||
import { useColorScheme } from '@/hooks/useColorScheme';
|
||||
|
||||
type ThemedDividerProps = ViewProps & {
|
||||
orientation?: 'horizontal' | 'vertical';
|
||||
thickness?: DimensionValue;
|
||||
length?: DimensionValue;
|
||||
color?: string;
|
||||
};
|
||||
|
||||
const ThemedDivider: React.FC<ThemedDividerProps> = ({
|
||||
orientation = 'horizontal',
|
||||
thickness = 1,
|
||||
length = '100%',
|
||||
style,
|
||||
...restProps
|
||||
}) => {
|
||||
const scheme = useColorScheme() ?? 'dark';
|
||||
const color = restProps.color || Colors[scheme].border;
|
||||
|
||||
return (
|
||||
<View
|
||||
style={[
|
||||
orientation === 'horizontal'
|
||||
? { height: thickness, width: length }
|
||||
: { width: thickness, height: length },
|
||||
{ backgroundColor: color },
|
||||
style,
|
||||
]}
|
||||
{...restProps}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default ThemedDivider;
|
||||
Reference in New Issue
Block a user