未验证 提交 d1a43619 编写于 作者: J Joe Haddad 提交者: GitHub

[Fast Refresh] Add Titles for Click to Open Action (#12427)

上级 5787cbd9
...@@ -57,7 +57,12 @@ export const CodeFrame: React.FC<CodeFrameProps> = function CodeFrame({ ...@@ -57,7 +57,12 @@ export const CodeFrame: React.FC<CodeFrameProps> = function CodeFrame({
// TODO: make the caret absolute // TODO: make the caret absolute
return ( return (
<div data-nextjs-codeframe> <div data-nextjs-codeframe>
<p role="link" onClick={open} tabIndex={0}> <p
role="link"
onClick={open}
tabIndex={0}
title="Click to open in your editor"
>
<span> <span>
{getFrameSource(stackFrame)} @ {stackFrame.methodName} {getFrameSource(stackFrame)} @ {stackFrame.methodName}
</span> </span>
......
...@@ -40,6 +40,7 @@ const CallStackFrame: React.FC<{ ...@@ -40,6 +40,7 @@ const CallStackFrame: React.FC<{
tabIndex={hasSource ? 0 : undefined} tabIndex={hasSource ? 0 : undefined}
role={hasSource ? 'link' : undefined} role={hasSource ? 'link' : undefined}
onClick={open} onClick={open}
title={hasSource ? 'Click to open in your editor' : undefined}
> >
<span>{getFrameSource(f)}</span> <span>{getFrameSource(f)}</span>
<svg <svg
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册