Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"monochromeImage": "./assets/images/android-icon-monochrome.png"
},
"edgeToEdgeEnabled": true,
"predictiveBackGestureEnabled": false
"predictiveBackGestureEnabled": false,
"package": "com.anonymous.payperclientv2tmp"
},
"web": {
"output": "static",
Expand Down
40 changes: 38 additions & 2 deletions app/(tabs)/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,45 @@
import { Text, View } from "react-native";
import { Text, View, Pressable, StyleSheet } from "react-native";

Check warning on line 1 in app/(tabs)/index.tsx

View workflow job for this annotation

GitHub Actions / Lint

'StyleSheet' is defined but never used

Check warning on line 1 in app/(tabs)/index.tsx

View workflow job for this annotation

GitHub Actions / Lint

'Pressable' is defined but never used
import { Button } from "@/shared/ui/Button";

export default function Home() {
return (
<View className="flex-1 items-center justify-center bg-white">
<View className="flex-1 items-center justify-center bg-white gap-3 px-6">
<Text className="text-2xl font-bold mb-6">payper 홈 화면</Text>

{/* 일반 Pressable 테스트 */}
{/*<Pressable style={testStyles.button}>*/}
{/* <Text style={testStyles.text}>일반 Pressable 버튼</Text>*/}
{/*</Pressable>*/}

<Button onPress={() => alert("Primary!")}>Primary 버튼</Button>
<Button variant="outline" color="primary">Outline 버튼</Button>
<Button variant="ghost" color="primary">Ghost 버튼</Button>

<View className="flex-row gap-2 mt-4">
<Button size="sm" color="success">Small</Button>
<Button size="md" color="warning">Medium</Button>
<Button size="lg" color="danger">Large</Button>
</View>

<Button fullWidth color="default" className="mt-4">전체 너비 버튼</Button>
<Button isLoading>로딩 중...</Button>
<Button disabled>비활성화</Button>
</View>
);
}

// const testStyles = StyleSheet.create({
// button: {
// backgroundColor: "#F67154",
// paddingVertical: 12,
// paddingHorizontal: 24,
// borderRadius: 8,
// alignItems: "center",
// justifyContent: "center",
// },
// text: {
// color: "#FFFFFF",
// fontSize: 16,
// fontWeight: "600",
// },
// });
10 changes: 10 additions & 0 deletions mocks/handlers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { http, HttpResponse } from 'msw'

export const handlers = [
http.get('https://api.example.com/user', () => {
return HttpResponse.json({
id: 1,
name: 'Donghyuk',
})
}),
]
4 changes: 4 additions & 0 deletions mocks/server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { setupServer } from 'msw/node'
import { handlers } from './handlers'

export const server = setupServer(...handlers)
Loading
Loading