-
Notifications
You must be signed in to change notification settings - Fork 2
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
[feat] style view-plants #56
Conversation
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.
looking good so far! a note about error handling in mapMonthToSeason
- will check back in after additional styling!
utils/helpers.ts
Outdated
@@ -227,3 +227,26 @@ export function formatTimestamp(timestamp: string): string { | |||
// Return in MM/DD/YYYY format | |||
return `${month}/${day}/${year}`; | |||
} | |||
export function mapMonthToSeason(month: string): string { | |||
month = processPlantMonth(month).toUpperCase(); | |||
const monthToSeason: { [key: string]: string } = { |
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.
maybe we can move this map outside the function in case we need to use it elsewhere?
align-items: center; | ||
width: 136px; | ||
`; | ||
export const PlantImage = styled.img` |
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.
i think we should be using styled(NextImage)
instead of styled.img
0 24px 38px 3px rgb(148, 181, 6, 0.14), | ||
0 9px 46px 8px rgb(148, 181, 6, 0.12), | ||
0 11px 15px -7px rgb(148, 181, 6, 0.2)` |
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.
checking w/ kyrene if we want this!
background: none; | ||
border: none; | ||
color: ${COLORS.shrub}; | ||
font-family: inherit; |
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.
this should be by default!
font-size: 16px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: normal; |
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.
note, this should be a styled(P1)
, which would handle the font styling for you. then, you can use HeaderButton with as="button"
, i.e.
<HeaderButton as="button"> </HeaderButton>
Pull the latest commits on main to see the P1 style in styles/text.ts
!
…rap-garden into style-view-plants
What's new in this PR 🧑🌾
Description
PlantCard
a memoized component: this prevents unnecessary re-renders whenfilteredPlantList
changes, but the plants themselves don't change.styles/containers.ts
for generic Box and Flex containersScreenshots
My Garden
All Plants
How to review
/view-plants
,components/PlantCard/
Next steps
styling
RoundCheck
)functionality
Relevant links
Online sources
Related PRs
CC: @ccatherinetan