Skip to content

Commit

Permalink
chore: Add extra spacing to nav card only when necessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
mturoci committed Jul 3, 2023
1 parent 7dad1c1 commit e237260
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const css = stylesheet({
})

export const
XNav = ({ items, value, hideNav }: State & { hideNav?: () => void }) => {
XNav = ({ items, value, hideNav, linksOnly = false }: State & { hideNav?: () => void, linksOnly?: B }) => {
const groups = items.map((g): Fluent.INavLinkGroup => ({
name: g.label,
collapseByDefault: g.collapsed,
Expand All @@ -129,7 +129,7 @@ export const
title: tooltip,
style: {
opacity: disabled ? 0.7 : undefined,
marginTop: idx === 0 && !g.label ? 30 : undefined
marginTop: !linksOnly && idx === 0 && !g.label ? 30 : undefined
},
url: '',
onClick: () => {
Expand Down Expand Up @@ -161,7 +161,7 @@ export const
{subtitle && <div className={clas('wave-s13', color === 'card' ? 'wave-t8' : 'wave-c8')}>{subtitle}</div>}
{!image && !icon && persona?.persona && <div className={css.persona}><XPersona model={persona.persona} /></div>}
</div>
<XNav {...state} />
<XNav {...state} linksOnly={!image && !icon && !title && !subtitle && !persona} />
{secondary_items && <div className={css.secondaryItems} style={{ marginTop: state.items.length ? 'auto' : 'initial' }}><XComponents items={secondary_items} /></div>}
</div>)
}
Expand Down

0 comments on commit e237260

Please sign in to comment.