Skip to content

feat(SidebarItem): hover effect #7934

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,37 @@
@apply font-regular
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the hover effect added to the Progression sidebar doesn’t align well with the overall site design.

image image

IMO We could achieve a more consistent look by updating the span color to a lighter shade of the active SVG’s fill color like this;

image

relative
z-20
mb-px
flex
w-full
items-center
overflow-hidden
rounded-md
text-sm
text-neutral-800
dark:text-neutral-200;

&:hover {
&:not(.progression) .label {
@apply rounded-sm
bg-neutral-100
text-neutral-900
dark:bg-neutral-800
dark:text-neutral-100;
}

.icon {
@apply scale-110
text-green-600
dark:text-green-400;
}
}

.label {
@apply font-regular
flex
items-center
gap-1.5
p-2
text-sm;
}
Expand All @@ -37,6 +58,11 @@
.label {
@apply p-1;
}

&:not(.active):hover {
@apply bg-neutral-100
dark:bg-neutral-900;
}
}

&.active {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ const SidebarItem: FC<SidebarItemProps> = ({
{showProgressionIcons && (
<ProgressionIcon className={styles.progressionIcon} />
)}
<span className={styles.label}>{label}</span>

{/^https?:/.test(link) && <ArrowUpRightIcon className={styles.icon} />}
<div className={styles.label}>
<span>{label}</span>

{/^https?:/.test(link) && <ArrowUpRightIcon className={styles.icon} />}
</div>
</BaseActiveLink>
);

Expand Down