Skip to content

Commit 2ad1806

Browse files
committed
Show edit buttons while tabbing
1 parent 9c6e667 commit 2ad1806

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/InteractiveCodeBlock/InteractiveCodeBlock.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export function InteractiveCodeBlock<
232232
</pre>
233233
{buttonIcon ? (
234234
<Button
235-
css={{ opacity: buttonIcon === resetIcon ? 1 : 0}}
235+
css={{ opacity: buttonIcon === resetIcon ? 1 : 0, 'html:not([data-hide-outlines]) &': { opacity: 1 } }}
236236
disabled={props.isLoading}
237237
onClick={isChanged
238238
? () => setTimeout(() => setState(originalState), 50)

src/hooks/useOutlineStatus.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const onMouseDown = () => {
1414
export function useOutlineStatus() {
1515
useEffect(() => {
1616
if (!isSSR) {
17+
onMouseDown();
1718
document.addEventListener('keydown', onKeyDown);
1819
document.addEventListener('mousedown', onMouseDown);
1920
return () => {

0 commit comments

Comments
 (0)