Skip to content

Commit

Permalink
dev: minor fixes (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
chamarasanjeewadev authored Oct 11, 2024
1 parent 9a67192 commit 29a1cf9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
4 changes: 2 additions & 2 deletions components/UserNameForm.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import AntDesign from '@expo/vector-icons/AntDesign';
import { zodResolver } from '@hookform/resolvers/zod';
import { useRouter } from 'expo-router';
import React, { useEffect } from 'react';
Expand All @@ -7,6 +6,7 @@ import { View, TouchableOpacity, KeyboardAvoidingView, Platform, ScrollView } fr
import { z } from 'zod';

import { useUserStore } from '../store/useUserStore';
import RightCircleSvg from './atoms/Icons/RightCircle';

import { Text, TextInput } from '~/components/atoms';

Expand Down Expand Up @@ -110,7 +110,7 @@ export default function UserNameForm() {
disabled={!isValid}
style={{ opacity: isValid ? 1 : 0.4 }} // Add this line
>
<AntDesign name="rightcircle" size={56} color="#523AE4" />
<RightCircleSvg />
</TouchableOpacity>
</View>
</KeyboardAvoidingView>
Expand Down
9 changes: 2 additions & 7 deletions components/atoms/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@ export const Button = forwardRef<TouchableOpacity, ButtonProps>(
<TouchableOpacity
ref={ref}
{...touchableProps}
className={`${styles.button} ${touchableProps.className}`}>
<Text className={styles.buttonText}>{title}</Text>
className={`items-center justify-center rounded-[28px] bg-primary p-4 shadow-md ${touchableProps.className}`}>
<Text className="text-center text-lg font-semibold text-white">{title}</Text>
</TouchableOpacity>
);
}
);

const styles = {
button: 'items-center bg-indigo-500 rounded-[28px] shadow-md p-4',
buttonText: 'text-white text-lg font-semibold text-center',
};
28 changes: 28 additions & 0 deletions components/atoms/Icons/RightCircle.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as React from 'react';
import Svg, { Rect, Path } from 'react-native-svg';

interface RightCircleSvgProps {
width?: number;
height?: number;
backgroundFill?: string;
arrowFill?: string;
[key: string]: any;
}

const RightCircleSvg: React.FC<RightCircleSvgProps> = ({
width = 64,
height = 64,
backgroundFill = '#523AE4',
arrowFill = '#FAFAFA',
...props
}) => (
<Svg width={width} height={height} viewBox="0 0 64 64" fill="none" {...props}>
<Rect x={4} y={2} width={56} height={56} rx={28} fill={backgroundFill} />
<Path
d="M26.918 20.87a1.334 1.334 0 0 0 0 1.803l7.46 7.33-7.459 7.328a1.334 1.334 0 0 0 0 1.801 1.334 1.334 0 0 0 1.769.001L38 30l-9.311-9.131a1.334 1.334 0 0 0-1.771.001Z"
fill={arrowFill}
/>
</Svg>
);

export default RightCircleSvg;
1 change: 0 additions & 1 deletion components/atoms/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export { Text } from './Text';
export { TextInput } from './TextInput';

export { TalkSvg } from './Icons/Talk';
export { Button } from './Button';

0 comments on commit 29a1cf9

Please sign in to comment.