Skip to content

Commit

Permalink
styory
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Jan 10, 2025
1 parent bec9b16 commit 7704012
Showing 1 changed file with 30 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,39 @@ const meta: Meta<typeof CallStackFrame> = {
export default meta
type Story = StoryObj<typeof CallStackFrame>

export const SimpleFrame: Story = {
const frame = {
originalStackFrame: {
file: './app/page.tsx',
methodName: 'MyComponent',
arguments: [],
lineNumber: 10,
column: 5,
ignored: false,
},
sourceStackFrame: {
file: './app/page.tsx',
methodName: 'MyComponent',
arguments: [],
lineNumber: 10,
column: 5,
},
error: false,
reason: null,
external: false,
ignored: false,
}

export const HasSource: Story = {
args: {
frame: {
originalStackFrame: {
file: './app/page.tsx',
methodName: 'MyComponent',
arguments: [],
lineNumber: 10,
column: 5,
ignored: false,
},
sourceStackFrame: {
file: './app/page.tsx',
methodName: 'MyComponent',
arguments: [],
lineNumber: 10,
column: 5,
},
...frame,
originalCodeFrame: 'export default function MyComponent() {',
error: false,
reason: null,
external: false,
ignored: false,
},
},
}

export const NoSource: Story = {
args: {
frame,
},
}

0 comments on commit 7704012

Please sign in to comment.