Skip to content

Commit 46526da

Browse files
authored
Use opacity transition instead of display:none (#2223)
## Background I'm hiding the info message on keydown in the codemirror because it sorta overlaps with the space for the query, and if you've seen and started writing it you don't need it that much anymore. Not my best work, but it's okay before the designers have an idea how to compose it nicely. ## Description This PR changes from `hidden` to `opacity-0` class to reduce the layout shift and make it more pleasing to the eyes.
1 parent 6ae6c00 commit 46526da

File tree

1 file changed

+3
-1
lines changed
  • src/components/index-page/how-it-works

1 file changed

+3
-1
lines changed

src/components/index-page/how-it-works/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ export function HowItWorks() {
6767
</ol>
6868
)}
6969
</div>
70-
<FigureInfo className={interacted ? "hidden" : ""} />
70+
<FigureInfo
71+
className={clsx("transition-opacity", interacted ? "opacity-0" : "")}
72+
/>
7173

7274
<Button className="mx-auto mt-8 w-fit lg:mt-16" href={TRY_IT_OUT_URL}>
7375
Try GraphiQL

0 commit comments

Comments
 (0)