Skip to content

Commit

Permalink
Hover states for the library page
Browse files Browse the repository at this point in the history
  • Loading branch information
crismali committed Jan 22, 2025
1 parent 01e5ced commit 05923e7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/pages/library.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,37 @@
padding: 0.25rem 0.75rem;
}

&:hover,
&:focus-within {
background-color: var(--gray-medium);
}

&:has(:checked) {
background-color: var(--black);
color: var(--white);
}

&:hover:has(:checked),
&:focus-within:has(:checked) {
background-color: var(--gray-dark-extra);
}
}

.library-list {
margin-top: 1.5rem;
margin-bottom: 6rem;
}

.library-item.email-template {
border-radius: 0.5rem;
transition: background-color ease-in 100ms;

&:hover,
&:focus-within {
background-color: var(--gray-light);
}
}

.library-name-container {
align-items: center;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/library.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const LibaryPage: FC = () => {
{filteredEmailTemplates.length > 0 ? (
<List className="library-list">
{filteredEmailTemplates.map(({ id, name, description, path }) => (
<ListItem key={id} className="library-item">
<ListItem key={id} className="library-item email-template">
<Link to={path} className="library-name">
{name}
</Link>
Expand Down

0 comments on commit 05923e7

Please sign in to comment.