Skip to content

Commit 92b2abc

Browse files
committed
feat(pressable-feedback): add card examples
1 parent 0b969b4 commit 92b2abc

File tree

5 files changed

+193
-350
lines changed

5 files changed

+193
-350
lines changed

example/src/app/(home)/components/card.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ const CardWithImageContent = () => {
4848
return (
4949
<View className="flex-1 items-center justify-center px-5">
5050
<View className="flex-row gap-4">
51-
<Card variant="tertiary" className="flex-1 aspect-[1/1.3] rounded-2xl">
51+
<Card className="flex-1 aspect-[1/1.3] rounded-2xl">
5252
<View className="flex-1 gap-4">
5353
<Card.Header>
5454
<Image
5555
source={{
56-
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/backgrounds/cards/robot1.jpg',
56+
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/demo1.jpg',
5757
}}
5858
style={{
5959
height: 60,
@@ -76,12 +76,12 @@ const CardWithImageContent = () => {
7676
</Card.Footer>
7777
</View>
7878
</Card>
79-
<Card variant="tertiary" className="flex-1 aspect-[1/1.3] rounded-2xl">
79+
<Card className="flex-1 aspect-[1/1.3] rounded-2xl">
8080
<View className="flex-1 gap-4">
8181
<Card.Header>
8282
<Image
8383
source={{
84-
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/images/heroui-native-example/components-card-robot.png',
84+
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/demo2.jpg',
8585
}}
8686
style={{
8787
height: 60,
@@ -114,22 +114,22 @@ const CardWithImageContent = () => {
114114
const HorizontalCardWithImageContent = () => {
115115
return (
116116
<View className="flex-1 items-center justify-center px-5">
117-
<View className="gap-4">
117+
<View className="w-full gap-4">
118118
<Card className="flex-row rounded-2xl gap-4 p-4" variant="tertiary">
119119
<Image
120120
source={{
121-
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/backgrounds/cards/robot2.jpg',
121+
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/avocado.jpeg',
122122
}}
123123
style={{
124124
height: 110,
125125
aspectRatio: 1,
126-
borderRadius: 12,
126+
borderRadius: 14,
127127
}}
128128
resizeMode="cover"
129129
/>
130-
<View className="gap-4">
130+
<View className="flex-1 gap-4">
131131
<Card.Body className="flex-1">
132-
<Card.Title>Bringing the future</Card.Title>
132+
<Card.Title>Avocado Hackathon</Card.Title>
133133
<Card.Description numberOfLines={2} className="text-sm">
134134
Today, 6:30 PM
135135
</Card.Description>
@@ -151,7 +151,7 @@ const HorizontalCardWithImageContent = () => {
151151
<Card className="flex-row rounded-2xl gap-4 p-4" variant="tertiary">
152152
<Image
153153
source={{
154-
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/backgrounds/cards/car1.jpg',
154+
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/oranges.jpeg',
155155
}}
156156
style={{
157157
height: 110,
@@ -160,9 +160,9 @@ const HorizontalCardWithImageContent = () => {
160160
}}
161161
resizeMode="cover"
162162
/>
163-
<View className="gap-4">
163+
<View className="flex-1 gap-4">
164164
<Card.Body className="flex-1">
165-
<Card.Title>Marketing Conf</Card.Title>
165+
<Card.Title>Sound Electro</Card.Title>
166166
<Card.Description numberOfLines={2} className="text-sm">
167167
Wed, 4:30 PM
168168
</Card.Description>
@@ -194,22 +194,22 @@ const BackgroundImageCardContent = () => {
194194
<Card className="w-full aspect-square">
195195
<Image
196196
source={{
197-
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/backgrounds/cards/dog1.jpg',
197+
uri: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/docs/neo2.jpeg',
198198
}}
199199
className="absolute inset-0"
200200
resizeMode="cover"
201201
/>
202202
<LinearGradient
203-
colors={['rgba(0,0,0,0.1)', 'rgba(0,0,0,0.8)']}
203+
colors={['rgba(0,0,0,0.1)', 'rgba(0,0,0,0.5)']}
204204
style={StyleSheet.absoluteFill}
205205
/>
206206
<View className="flex-1 gap-4">
207207
<Card.Body className="flex-1">
208208
<Card.Title className="text-base text-zinc-50 uppercase mb-0.5">
209-
Pet health
209+
Neo
210210
</Card.Title>
211211
<Card.Description className="text-zinc-50 font-medium text-base">
212-
Your pet deserve the best
212+
Home robot
213213
</Card.Description>
214214
</Card.Body>
215215
<Card.Footer className="gap-3">
@@ -218,7 +218,7 @@ const BackgroundImageCardContent = () => {
218218
<AppText className="text-base text-white">
219219
Available soon
220220
</AppText>
221-
<AppText className="text-base text-zinc-400">
221+
<AppText className="text-base text-zinc-300">
222222
Get notified
223223
</AppText>
224224
</View>

0 commit comments

Comments
 (0)