Skip to content

Commit 10aa289

Browse files
committed
better Layout component
1 parent 54343f2 commit 10aa289

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

hackathon/revolut-kids-clone/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function App() {
88
<View className="flex-1 items-center justify-center bg-sky-400">
99
<Text>Open up App.tsx to start working on your app!</Text>
1010
<StatusBar style="auto" />
11-
<Row>
11+
<Row containerStyle="justify-around w-full py-4">
1212
<Button variant="primary">Log in</Button>
1313
<Button variant="secondary">Sign up</Button>
1414
</Row>

hackathon/revolut-kids-clone/src/components/Layout.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import React from "react";
33

44
type ButtonProps = {
55
children: React.ReactNode;
6+
containerStyle?: string;
67
};
78

8-
export const Row = ({ children }: ButtonProps) => {
9-
return <View className="flex-row">{children}</View>;
9+
export const Row = ({ children, containerStyle }: ButtonProps) => {
10+
console.log("file: Layout.tsx ~ line 10 ~ Row ~ className", containerStyle);
11+
return <View className={`${containerStyle} flex-row`}>{children}</View>;
1012
};

0 commit comments

Comments
 (0)