-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Home banners #16
Merged
Merged
Home banners #16
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,48 @@ | ||
import images from 'assets'; | ||
|
||
import { HeaderLogo } from '@/components/header-logo'; | ||
import { Banner } from '@/components/home/bannner'; | ||
import { HorizontalCarousel } from '@/components/home/carousel'; | ||
import { SafeAreaView } from '@/ui'; | ||
import PaymentMethods from '@/components/home/payment-methods'; | ||
import { SafeAreaView, ScrollView, Text, View } from '@/ui'; | ||
|
||
export default function Feed() { | ||
return ( | ||
<SafeAreaView> | ||
<SafeAreaView className="bg-light_background"> | ||
<HeaderLogo /> | ||
<HorizontalCarousel /> | ||
<ScrollView className="mb-6"> | ||
<HorizontalCarousel /> | ||
<Banner | ||
alignment="left" | ||
background="dark" | ||
image={images.furnitureBanner()} | ||
> | ||
<Text className="mb-2 font-semibold color-white"> | ||
Check out our new and restored furniture | ||
</Text> | ||
<Text className="color-white"> | ||
Shop today and get a 10% discount! | ||
</Text> | ||
</Banner> | ||
<View className="bg-white"> | ||
<Text className="mb-8 mt-4 self-center text-lg font-bold"> | ||
Payment methods | ||
</Text> | ||
<PaymentMethods /> | ||
</View> | ||
<Banner | ||
alignment="right" | ||
background="dark" | ||
image={images.fedexBanner()} | ||
> | ||
<Text className="mb-2 font-semibold color-white"> | ||
We upgraded our shipments many levels up | ||
</Text> | ||
<Text className="color-white"> | ||
Powered by <Text className="color-green-400">FedEx</Text> | ||
</Text> | ||
</Banner> | ||
</ScrollView> | ||
</SafeAreaView> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Image, View } from '@/ui'; | ||
|
||
type BannerProps = { | ||
background: string; | ||
alignment: 'left' | 'right'; | ||
image: any; | ||
children: React.ReactNode; | ||
}; | ||
|
||
export const Banner = ({ | ||
background, | ||
alignment, | ||
image, | ||
children, | ||
}: BannerProps) => { | ||
const isLeftAligned = alignment === 'left'; | ||
|
||
return ( | ||
<View | ||
className={`my-6 flex h-40 w-full gap-px overflow-hidden rounded-lg px-6 ${ | ||
isLeftAligned ? 'flex-row' : 'flex-row-reverse' | ||
}`} | ||
> | ||
<Image | ||
source={image} | ||
contentFit="cover" | ||
className={`h-full w-[47%] ${ | ||
isLeftAligned ? 'rounded-l-lg' : 'rounded-r-lg' | ||
}`} | ||
/> | ||
|
||
<View | ||
className={`flex h-full w-[53%] items-start justify-center p-6 ${background} ${ | ||
isLeftAligned ? 'rounded-r-lg' : 'rounded-l-lg' | ||
} ${background === 'dark' ? 'bg-dark_violet' : ''}`} | ||
> | ||
{children} | ||
</View> | ||
</View> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import images from 'assets'; | ||
|
||
import { Image, Text, TouchableOpacity, View } from '@/ui'; | ||
|
||
const PaymentMethods = () => { | ||
return ( | ||
<View className="my-4 h-20 w-4/5 flex-row items-center justify-evenly self-center"> | ||
<TouchableOpacity className="mx-3 items-center justify-items-center"> | ||
<Image | ||
source={images.creditCard()} | ||
className="mb-6 h-9 w-9" | ||
contentFit="contain" | ||
/> | ||
<Text>Credit</Text> | ||
</TouchableOpacity> | ||
<View className="mx-5 h-full w-px bg-black" /> | ||
<TouchableOpacity className="mx-3 items-center justify-items-center"> | ||
<Image | ||
source={images.paypal()} | ||
className="mb-6 h-9 w-9" | ||
contentFit="contain" | ||
/> | ||
<Text>Paypal</Text> | ||
</TouchableOpacity> | ||
<View className="mx-5 h-full w-px bg-black" /> | ||
<TouchableOpacity className="mx-3 items-center justify-items-center"> | ||
<Image | ||
source={images.crypto()} | ||
className="mb-6 h-9 w-9" | ||
contentFit="contain" | ||
/> | ||
<Text>Crypto</Text> | ||
</TouchableOpacity> | ||
</View> | ||
); | ||
}; | ||
|
||
export default PaymentMethods; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary file