Skip to content

Commit

Permalink
change all icon names to camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
ccatherinetan committed Dec 2, 2024
1 parent 6454da5 commit 3c19e62
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions components/DifficultyLevelBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export default function DifficultyLevelBar({
difficultyLevel: DifficultyLevelEnum;
}) {
if (difficultyLevel === 'EASY') {
return <Icon type="easy_bar" />;
return <Icon type="easyBar" />;
} else if (difficultyLevel === 'MODERATE') {
return <Icon type="moderate_bar" />;
return <Icon type="moderateBar" />;
} else {
// difficultyLevel === 'HARD'
return <Icon type="hard_bar" />;
return <Icon type="hardBar" />;
}
}
4 changes: 2 additions & 2 deletions components/PlantCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ const PlantCard = memo(function PlantCard({

<PlantAttributes>
<Attribute>
<Icon type="outdoors_growing_start"></Icon>
<Icon type="outdoorsSeason"></Icon>
<AttributeContent>
{useTitleCase(
mapMonthToSeason(plant.outdoors_start) || 'Unknown',
)}
</AttributeContent>
</Attribute>
<Attribute>
<Icon type="harvest_season"></Icon>
<Icon type="harvestSeason"></Icon>
<AttributeContent>
{useTitleCase(plant.harvest_season)}
</AttributeContent>
Expand Down
2 changes: 1 addition & 1 deletion components/YourPlantDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default function YourPlantDetails({

<DetailRow>
<StyledIcon>
<Icon type="plant_hand" />
<Icon type="plantHand" />
</StyledIcon>
<DetailText>Planting Type: {useTitleCase(plantingType)}</DetailText>
</DetailRow>
Expand Down
12 changes: 6 additions & 6 deletions lib/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const IconSvgs = {
</defs>
</svg>
),
plant_hand: (
plantHand: (
<svg
width="15"
height="15"
Expand Down Expand Up @@ -189,7 +189,7 @@ export const IconSvgs = {
</defs>
</svg>
),
easy_bar: (
easyBar: (
<svg
width="24"
height="6"
Expand All @@ -209,7 +209,7 @@ export const IconSvgs = {
/>
</svg>
),
moderate_bar: (
moderateBar: (
<svg
width="24"
height="6"
Expand All @@ -229,7 +229,7 @@ export const IconSvgs = {
/>
</svg>
),
hard_bar: (
hardBar: (
<svg
width="24"
height="6"
Expand All @@ -248,7 +248,7 @@ export const IconSvgs = {
/>
</svg>
),
outdoors_growing_start: (
outdoorsSeason: (
<svg
width="11"
height="11"
Expand All @@ -275,7 +275,7 @@ export const IconSvgs = {
</defs>
</svg>
),
harvest_season: (
harvestSeason: (
<svg
width="11"
height="11"
Expand Down

0 comments on commit 3c19e62

Please sign in to comment.