-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update filter ui and hover state (#165)
- Loading branch information
Fran McDade
authored and
Fran McDade
committed
Aug 26, 2024
1 parent
93f90c8
commit 01ed245
Showing
7 changed files
with
44 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 25 additions & 5 deletions
30
src/components/Filter/components/FilterLabel/filterLabel.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,54 @@ | ||
import { css } from "@emotion/react"; | ||
import styled from "@emotion/styled"; | ||
import { Button } from "@mui/material"; | ||
import { mediaDesktopSmallUp } from "../../../../styles/common/mixins/breakpoints"; | ||
import { inkLight, smokeMain } from "../../../../styles/common/mixins/colors"; | ||
|
||
export const FilterLabel = styled(Button)` | ||
interface Props { | ||
isOpen: boolean; | ||
} | ||
|
||
export const FilterLabel = styled(Button, { | ||
shouldForwardProp: (prop) => prop !== "isOpen", | ||
})<Props>` | ||
font-weight: inherit; | ||
gap: 0; | ||
justify-content: space-between; | ||
padding: 10px 16px; | ||
padding: 10px 8px; | ||
text-transform: none; | ||
text-align: left; | ||
:hover { | ||
background-color: transparent; | ||
background-color: ${smokeMain}; | ||
} | ||
&.Mui-disabled { | ||
opacity: 0.3; | ||
} | ||
& .MuiButton-endIcon { | ||
color: ${inkLight}; | ||
margin-right: -4px; | ||
transform: rotate(-90deg); | ||
} | ||
${mediaDesktopSmallUp} { | ||
padding: 6px 0; | ||
padding: 6px 8px; | ||
& .MuiButton-endIcon { | ||
margin-right: 0; | ||
transform: unset; | ||
} | ||
} | ||
${(props) => | ||
props.isOpen && | ||
css` | ||
background-color: ${smokeMain(props)}; | ||
${mediaDesktopSmallUp(props)} { | ||
& .MuiButton-endIcon { | ||
transform: rotate(180deg); | ||
} | ||
} | ||
`}; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 1 addition & 6 deletions
7
src/components/Filter/components/FilterTags/filterTags.styles.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import styled from "@emotion/styled"; | ||
import { mediaDesktopSmallUp } from "../../../../styles/common/mixins/breakpoints"; | ||
|
||
export const FilterTags = styled.span` | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: 4px; | ||
margin-bottom: 8px; | ||
padding: 0 16px; | ||
padding: 0 8px; | ||
&:last-child { | ||
margin-bottom: 0; | ||
} | ||
${mediaDesktopSmallUp} { | ||
padding: 0; | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters