Skip to content

Commit

Permalink
feat(v2): add icon to generic sidebar link (#4261)
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 authored Feb 22, 2021
1 parent 9c02bf7 commit be871b2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ function DocSidebarItemLink({
<Link
className={clsx('menu__link', {
'menu__link--active': isActive,
[styles.menuLinkExternal]: !isInternalUrl(href),
})}
to={href}
{...(isInternalUrl(href) && {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,19 @@
}

:global(.menu__list-item--collapsed) :global(.menu__list) {
height: 0px !important;
height: 0 !important;
}

.menuLinkExternal {
align-items: center;
}
.menuLinkExternal:after {
content: '';
height: 1.15rem;
width: 1.15rem;
min-width: 1.15rem;
margin: 0 auto 0 3%;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(0,0,0,0.5)' d='M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z'/%3E%3C/svg%3E")
no-repeat;
filter: var(--ifm-menu-link-sublist-icon-filter);
}

0 comments on commit be871b2

Please # to comment.