Skip to content

Commit 6cce6bf

Browse files
committed
use button styles in PlantPages
1 parent 7b63176 commit 6cce6bf

File tree

5 files changed

+19
-112
lines changed

5 files changed

+19
-112
lines changed

app/plant-page/all-plants/[plantId]/page.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ import { useEffect, useState } from 'react';
44
import { useParams, useRouter } from 'next/navigation';
55
import { UUID } from 'crypto';
66
import { getPlantById } from '@/api/supabase/queries/plants';
7+
import { SmallButton } from '@/components/Buttons';
78
import DifficultyLevelBar from '@/components/DifficultyLevelBar';
89
import GardeningTips from '@/components/GardeningTips';
910
import PlantCalendarRow from '@/components/PlantCalendarRow';
1011
import PlantCareDescription from '@/components/PlantCareDescription';
12+
import COLORS from '@/styles/colors';
1113
import { Flex } from '@/styles/containers';
1214
import { H4 } from '@/styles/text';
1315
import { Plant } from '@/types/schema';
@@ -22,7 +24,6 @@ import {
2224
PlantImage,
2325
PlantName,
2426
} from '../../style';
25-
import { AddPlant } from './style';
2627

2728
export default function GeneralPlantPage() {
2829
const router = useRouter();
@@ -71,7 +72,9 @@ export default function GeneralPlantPage() {
7172
</NameWrapper>
7273
{/*Add button only appears if user is logged in and onboarded*/}
7374
{profileReady && profileData && (
74-
<AddPlant onClick={handleAdd}>Add +</AddPlant>
75+
<SmallButton $primaryColor={COLORS.shrub} onClick={handleAdd}>
76+
Add +
77+
</SmallButton>
7578
)}
7679
</Flex>
7780
<ComponentWrapper>

app/plant-page/all-plants/[plantId]/style.ts

Lines changed: 0 additions & 81 deletions
This file was deleted.

app/plant-page/my-garden/[userPlantId]/page.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ import {
88
getUserPlantById,
99
upsertUserPlant,
1010
} from '@/api/supabase/queries/userPlants';
11+
import { SmallButton } from '@/components/Buttons';
1112
import DifficultyLevelBar from '@/components/DifficultyLevelBar';
1213
import GardeningTips from '@/components/GardeningTips';
1314
import PlantCalendarRow from '@/components/PlantCalendarRow';
1415
import PlantCareDescription from '@/components/PlantCareDescription';
1516
import YourPlantDetails from '@/components/YourPlantDetails';
17+
import COLORS from '@/styles/colors';
1618
import { Flex } from '@/styles/containers';
17-
import { H4 } from '@/styles/text';
19+
import { H4, P3 } from '@/styles/text';
1820
import { Plant, UserPlant } from '@/types/schema';
1921
import { getCurrentTimestamp } from '@/utils/helpers';
2022
import {
@@ -27,7 +29,6 @@ import {
2729
PlantImage,
2830
PlantName,
2931
} from '../../style';
30-
import { RemoveButton, Subtitle } from './style';
3132

3233
export default function UserPlantPage() {
3334
const router = useRouter();
@@ -69,7 +70,9 @@ export default function UserPlantPage() {
6970
>
7071
7172
</BackButton>
72-
<RemoveButton onClick={removePlant}>X Remove</RemoveButton>
73+
<SmallButton $primaryColor={COLORS.errorRed} onClick={removePlant}>
74+
X Remove
75+
</SmallButton>
7376
</ButtonWrapper>
7477
<PlantImage src={currentPlant.img} alt={currentPlant.plant_name} />
7578
</ImgHeader>
@@ -82,7 +85,13 @@ export default function UserPlantPage() {
8285
difficultyLevel={currentPlant.difficulty_level}
8386
/>
8487
</NameWrapper>
85-
<Subtitle>You have this plant in your garden!</Subtitle>
88+
<P3
89+
$fontWeight={400}
90+
$color={COLORS.shrub}
91+
style={{ fontStyle: 'italic' }}
92+
>
93+
You have this plant in your garden!
94+
</P3>
8695
</Flex>
8796
<ComponentWrapper>
8897
<YourPlantDetails

app/plant-page/my-garden/[userPlantId]/style.ts

Lines changed: 0 additions & 24 deletions
This file was deleted.

components/Buttons.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,5 @@ export const SmallButton = styled(P3).attrs({ as: 'button' })<ButtonProps>`
8080
border-radius: 20px;
8181
min-width: 60px;
8282
height: 24px;
83-
padding: 4px 4px;
83+
padding: 4px 10px;
8484
`;

0 commit comments

Comments
 (0)