Skip to content

Commit

Permalink
prevent whitespace collapse in filter text
Browse files Browse the repository at this point in the history
  • Loading branch information
ccatherinetan committed Dec 29, 2024
1 parent 9e06512 commit 293eccd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 2 additions & 4 deletions app/seasonal-planting-guide/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { PlantCalendarList } from '@/components/PlantCalendarList';
import SearchBar from '@/components/SearchBar';
import SeasonColorKey from '@/components/SeasonColorKey';
import COLORS from '@/styles/colors';
import { Box, Flex } from '@/styles/containers';
import { Box } from '@/styles/containers';
import { H1, H3 } from '@/styles/text';
import { DropdownOption, PlantingTypeEnum, SeasonEnum } from '@/types/schema';
import {
Expand Down Expand Up @@ -123,9 +123,7 @@ export default function SeasonalPlantingGuide() {
</StateOptionsContainer>
) : (
<Box $p="20px">
<Flex $direction="row" $justify="center">
<SeasonColorKey />
</Flex>
<SeasonColorKey />
<PlantCalendarList
growingSeasonFilterValue={selectedGrowingSeason}
harvestSeasonFilterValue={selectedHarvestSeason}
Expand Down
6 changes: 5 additions & 1 deletion app/seasonal-planting-guide/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const PageContainer = styled.div`
export const HeaderContainer = styled.div`
display: flex;
flex-direction: column;
padding: 2px 24px 20px 24px;
padding: 2px 24px 0 24px;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
background-color: #fff;
position: relative;
Expand All @@ -22,8 +22,12 @@ export const HeaderContainer = styled.div`
export const FilterContainer = styled.div`
display: flex;
flex-direction: row;
white-space: nowrap; // Prevent line break
gap: 8px;
margin-top: 12px;
margin-bottom: 20px;
padding-top: 1px;
padding-bottom: 1px; // ensure filter border isn't cut off
position: relative;
overflow-x: auto;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion components/Buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ export const SmallButton = styled(P3).attrs({ as: 'button' })<ButtonProps>`
// Unique to Small Button
border-radius: 20px;
min-width: 60px;
height: 24px;
min-height: 24px; // to prevent Clear Filters text overflow
padding: 4px 10px;
`;

0 comments on commit 293eccd

Please sign in to comment.