From c86cfd8f3a619db9014c28b1a742011c5e7660c6 Mon Sep 17 00:00:00 2001 From: JazzV2 Date: Wed, 3 Jan 2024 21:01:45 +0100 Subject: [PATCH] Primary button prettier code issue --- App.tsx | 1 - src/components/PrimaryButton.tsx | 50 ++++++++++++++++---------------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/App.tsx b/App.tsx index 67a541d..baf8c9a 100644 --- a/App.tsx +++ b/App.tsx @@ -1,4 +1,3 @@ -import PrimaryButton from '@/components/PrimaryButton'; import { StatusBar } from 'expo-status-bar'; import { StyleSheet, Text, View } from 'react-native'; diff --git a/src/components/PrimaryButton.tsx b/src/components/PrimaryButton.tsx index bd45563..7e7715c 100644 --- a/src/components/PrimaryButton.tsx +++ b/src/components/PrimaryButton.tsx @@ -1,36 +1,36 @@ -import { Pressable, StyleSheet, Text, View } from 'react-native' -import React from 'react' +import { Pressable, StyleSheet, Text } from 'react-native'; +import React from 'react'; interface Param { - title: string; - onPress: any; + title: string; + onPress: any; } const PrimaryButton = (param: Param) => { return ( - - {param.title} + + {param.title} - ) -} + ); +}; -export default PrimaryButton +export default PrimaryButton; const styles = StyleSheet.create({ - button: { - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#5964AB', - width: 291, - height: 44, - borderRadius: 10 - }, + button: { + justifyContent: 'center', + alignItems: 'center', + backgroundColor: '#5964AB', + width: 291, + height: 44, + borderRadius: 10, + }, - text: { - color: '#FFFFFF', - fontSize: 12, - lineHeight: 15, - fontWeight: '500', - textAlign: 'center' - } -}) \ No newline at end of file + text: { + color: '#FFFFFF', + fontSize: 12, + lineHeight: 15, + fontWeight: '500', + textAlign: 'center', + }, +});