Skip to content
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

Fix chevron toggle in Guides section of Sidebar #1567

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
12 changes: 10 additions & 2 deletions components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ export const DocsNav = ({
const rotateG = active.getStarted ? 'rotate(180deg)' : 'rotate(0)';
const rotateR = active.getReference ? 'rotate(180deg)' : 'rotate(0)';
const rotateSpec = active.getSpecification ? 'rotate(180deg)' : 'rotate(0)';
const rotateGuides = active.getGuides ? 'rotate(180deg)' : 'rotate(0)';

const { resolvedTheme } = useTheme();

Expand Down Expand Up @@ -590,7 +591,7 @@ export const DocsNav = ({
</div>
<svg
style={{
transform: rotateG,
transform: rotateGuides,
transition: 'all 0.2s linear',
cursor: 'pointer',
}}
Expand All @@ -610,7 +611,14 @@ export const DocsNav = ({
</svg>
</div>
<div
className={classnames('ml-6', { hidden: !active.getGuides })}
className={classnames(
'ml-6',
'transition-all duration-500 ease-in-out',
{
'max-h-0 opacity-0 overflow-hidden': !active.getGuides,
'max-h-80 opacity-100': active.getGuides,
},
)}
id='Guides'
>
<DocLink uri='/learn/guides' label='Overview' setOpen={setOpen} />
Expand Down