Skip to content

Commit

Permalink
docs: move anchor links to the right (#7350)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackySoul authored Aug 9, 2024
1 parent 46d6950 commit 35bbf1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions styleguide/Components/SectionSubheading/SectionSubheading.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
margin-top: 36px;
margin-bottom: 18px;
position: relative;
display: flex;
align-items: center;
}

.SectionSubheading__link {
position: absolute;
right: 100%;
padding-right: 6px;
top: 3px;
padding-left: 6px;
color: var(--vkui--color_icon_secondary);
opacity: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const SectionSubheading = ({ children, className, level = 2, href, ...res

return (
<Heading {...restProps} level={level} className={classNames('SectionSubheading', className)}>
<span className="SectionSubheading__text">{children}</span>
{href && id && (
<Fragment>
<a className="SectionSubheading__link" href={href}>
Expand All @@ -17,7 +18,6 @@ export const SectionSubheading = ({ children, className, level = 2, href, ...res
<a className="SectionSubheading__anchor" id={id} />
</Fragment>
)}
<span className="SectionSubheading__text">{children}</span>
</Heading>
);
};

0 comments on commit 35bbf1c

Please sign in to comment.