Skip to content
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Menu open state specific to CommonLayout */
.globalNav:has([data-radix-menu-content][data-state='open']) {
width: 11rem;
width: 15rem;
box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
.item {
gap: var(--spacing-2half);
width: auto;
justify-content: center;
}

.iconContainer > svg {
Expand All @@ -35,8 +36,10 @@

.labelArea {
display: flex;
gap: var(--spacing-2);
align-items: center;
gap: var(--spacing-2);
flex: 1;
min-width: 0;
opacity: 0;
transition: opacity 0.1s var(--default-timing-function);
}
Expand All @@ -50,6 +53,8 @@
}

.label {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
font-size: var(--font-size-4, 0.8125rem);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
.newSessionButton {
display: grid;
grid-auto-flow: column;
align-items: center;
justify-content: center;
justify-items: center;
column-gap: var(--spacing-2half);
color: var(--button-primary-foreground);
background-color: var(--button-primary-background);
border: var(--border-width-base) solid var(--button-primary-background);
Expand All @@ -12,3 +18,30 @@
.newSessionButton .icon {
color: var(--button-primary-foreground);
}

.iconContainer {
display: flex;
}

:global([data-global-nav-container]):hover .newSessionButton .iconContainer,
:global([data-global-nav-container]):has(
[data-radix-menu-content][data-state='open']
)
.newSessionButton
.iconContainer {
display: none;
}

.labelArea {
display: none;
justify-content: center;
}

:global([data-global-nav-container]):hover .newSessionButton .labelArea,
:global([data-global-nav-container]):has(
[data-radix-menu-content][data-state='open']
)
.newSessionButton
.labelArea {
display: flex;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export const NewSessionButton: FC = () => {
href={urlgen('design_sessions/new')}
className={clsx(itemStyles.item, styles.newSessionButton)}
>
<div className={itemStyles.iconContainer}>
<div className={clsx(itemStyles.iconContainer, styles.iconContainer)}>
<MessageCircleIcon className={styles.icon} />
</div>
<div className={itemStyles.labelArea}>
<span className={itemStyles.label}>New Session</span>
<div className={clsx(itemStyles.labelArea, styles.labelArea)}>
<span className={clsx(itemStyles.label)}>New Session</span>
</div>
</Link>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
width: 0.75rem;
height: 0.75rem;
color: var(--overlay-70);
margin-left: auto;
}

.dropdownContent {
min-width: 200px;
width: 15rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

:not([data-disable-hover]) > .globalNav:hover {
width: 11rem;
width: 15rem;
box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
}

Expand Down