File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
packages/next/src/next-devtools/dev-overlay/components/errors/error-overlay-toolbar Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
import type { Meta , StoryObj } from '@storybook/react'
2
- import { CopyStackTraceButton } from './copy-stack-trace -button'
2
+ import { CopyErrorButton } from './copy-error -button'
3
3
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
4
4
5
- const meta : Meta < typeof CopyStackTraceButton > = {
6
- component : CopyStackTraceButton ,
5
+ const meta : Meta < typeof CopyErrorButton > = {
6
+ component : CopyErrorButton ,
7
7
parameters : {
8
8
layout : 'centered' ,
9
9
} ,
10
10
decorators : [ withShadowPortal ] ,
11
11
}
12
12
13
13
export default meta
14
- type Story = StoryObj < typeof CopyStackTraceButton >
14
+ type Story = StoryObj < typeof CopyErrorButton >
15
15
16
16
export const WithStackTrace : Story = {
17
17
args : {
Original file line number Diff line number Diff line change 1
1
import { CopyButton } from '../../copy-button'
2
2
3
- export function CopyStackTraceButton ( {
3
+ export function CopyErrorButton ( {
4
4
error,
5
5
generateAIPrompt,
6
6
} : {
@@ -10,7 +10,7 @@ export function CopyStackTraceButton({
10
10
return (
11
11
< CopyButton
12
12
data-nextjs-data-runtime-error-copy-stack
13
- className = "copy-stack-trace -button"
13
+ className = "copy-error -button"
14
14
actionLabel = "Copy AI Debug Prompt"
15
15
successLabel = "AI Debug Prompt Copied"
16
16
getContent = { generateAIPrompt }
Original file line number Diff line number Diff line change 1
1
import type { DebugInfo } from '../../../../shared/types'
2
2
import { NodejsInspectorButton } from './nodejs-inspector-button'
3
- import { CopyStackTraceButton } from './copy-stack-trace -button'
3
+ import { CopyErrorButton } from './copy-error -button'
4
4
import { DocsLinkButton } from './docs-link-button'
5
5
6
6
type ErrorOverlayToolbarProps = {
@@ -20,7 +20,7 @@ export function ErrorOverlayToolbar({
20
20
< span className = "error-overlay-toolbar" >
21
21
{ /* TODO: Move the button inside and remove the feedback on the footer of the error overlay. */ }
22
22
{ feedbackButton }
23
- < CopyStackTraceButton error = { error } generateAIPrompt = { generateAIPrompt } />
23
+ < CopyErrorButton error = { error } generateAIPrompt = { generateAIPrompt } />
24
24
< DocsLinkButton errorMessage = { error . message } />
25
25
< NodejsInspectorButton
26
26
devtoolsFrontendUrl = { debugInfo ?. devtoolsFrontendUrl }
@@ -36,7 +36,7 @@ export const styles = `
36
36
}
37
37
38
38
.nodejs-inspector-button,
39
- .copy-stack-trace -button,
39
+ .copy-error -button,
40
40
.docs-link-button {
41
41
display: flex;
42
42
justify-content: center;
You can’t perform that action at this time.
0 commit comments