Scroll Comment Fixed

This commit is contained in:
Yash Rathore
2020-11-18 13:48:39 +05:30
parent 9708afb1d2
commit da01b41673
3 changed files with 15 additions and 27 deletions

View File

@@ -88,9 +88,11 @@ const PartProfile = ({
className="mt-6 ml-auto hover:shadow-lg bg-gradient-to-r from-transparent to-indigo-100"
shouldAnimateHover
iconName="chevron-down"
onClick={() => {}}
onClick={() => {
document.getElementById('section').scrollIntoView()
}}
>
Comments 11
{userPart.Part.Comment.length}
</Button>
<Link
to={routes.ide({
@@ -155,7 +157,10 @@ const PartProfile = ({
{!isEditable && (
<>
<div className="h-px bg-indigo-200 mt-8" />
<h3 className="text-indigo-800 text-lg font-roboto tracking-wider mb-4">
<h3
className="text-indigo-800 text-lg font-roboto tracking-wider mb-4"
id="section"
>
Comments
</h3>

View File

@@ -48,12 +48,13 @@
/* stop pop over from scrolling */
overflow: visible !important;
}
html {
scroll-behavior: smooth;
}
body {
/* TODO can I use a tailwind class here? */
background-color: #f7fafc;
}
button, input, label, textarea {
display: block;
outline: none;