Unverified Commit 5778fd4b authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

[DevOverlay] Improve Storybook Structure (#74764)

This PR removed the `title` of stories; that way, it's 1:1 with the codebase. The better the structure of the codebase, the better the structure of the storybook. Also, added `background` colors to test out UI correctly.

Closes NDX-655
parent be99a2f4
......@@ -8,6 +8,16 @@ const preview: Preview = {
date: /Date$/i,
},
},
backgrounds: {
values: [
{ name: 'backdrop', value: 'rgb(44, 44, 46);' },
{ name: 'background-100-light', value: '#ffffff' },
{ name: 'background-200-light', value: '#fafafa' },
{ name: 'background-100-dark', value: '#0a0a0a' },
{ name: 'background-200-dark', value: '#000000' },
],
default: 'backdrop',
},
},
}
......
......@@ -3,7 +3,6 @@ import { CodeFrame } from './CodeFrame'
import { withShadowPortal } from '../../storybook/with-shadow-portal'
const meta: Meta<typeof CodeFrame> = {
title: 'CodeFrame',
component: CodeFrame,
parameters: {
layout: 'fullscreen',
......
......@@ -3,10 +3,12 @@ import { CallStack } from './call-stack'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof CallStack> = {
title: 'CallStack',
component: CallStack,
parameters: {
layout: 'fullscreen',
backgrounds: {
default: 'background-100-dark',
},
},
decorators: [withShadowPortal],
}
......
......@@ -4,7 +4,6 @@ import { withShadowPortal } from '../../../storybook/with-shadow-portal'
import type { VersionInfo } from '../../../../../../../../server/dev/parse-version-info'
const meta: Meta<typeof DevToolsIndicator> = {
title: 'DevToolsIndicator',
component: DevToolsIndicator,
parameters: {
layout: 'centered',
......
......@@ -2,7 +2,6 @@ import type { Meta, StoryObj } from '@storybook/react'
import { NextLogo } from './next-logo'
const meta: Meta<typeof NextLogo> = {
title: 'NextLogo',
component: NextLogo,
parameters: {
layout: 'centered',
......
......@@ -3,7 +3,6 @@ import { ErrorMessage } from './error-message'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof ErrorMessage> = {
title: 'ErrorMessage',
component: ErrorMessage,
parameters: {
layout: 'fullscreen',
......
......@@ -3,7 +3,6 @@ import { ErrorOverlayBottomStacks } from './error-overlay-bottom-stacks'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof ErrorOverlayBottomStacks> = {
title: 'ErrorOverlayBottomStacks',
component: ErrorOverlayBottomStacks,
parameters: {
layout: 'fullscreen',
......
......@@ -3,7 +3,6 @@ import { ErrorOverlayFloatingHeader } from './error-overlay-floating-header'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof ErrorOverlayFloatingHeader> = {
title: 'ErrorOverlayFloatingHeader',
component: ErrorOverlayFloatingHeader,
parameters: {
layout: 'fullscreen',
......
......@@ -3,7 +3,6 @@ import { ErrorOverlayLayout } from './error-overlay-layout'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof ErrorOverlayLayout> = {
title: 'ErrorOverlayLayout',
component: ErrorOverlayLayout,
parameters: {
layout: 'fullscreen',
......
......@@ -4,7 +4,6 @@ import { withShadowPortal } from '../../../storybook/with-shadow-portal'
import { useState } from 'react'
const meta: Meta<typeof ErrorOverlayPagination> = {
title: 'ErrorOverlayPagination',
component: ErrorOverlayPagination,
parameters: {
layout: 'centered',
......
......@@ -3,7 +3,6 @@ import { CopyStackTraceButton } from './copy-stack-trace-button'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof CopyStackTraceButton> = {
title: 'ErrorOverlayToolbar/CopyStackTraceButton',
component: CopyStackTraceButton,
parameters: {
layout: 'centered',
......
......@@ -3,7 +3,6 @@ import { DocsLinkButton } from './docs-link-button'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof DocsLinkButton> = {
title: 'ErrorOverlayToolbar/DocsLinkButton',
component: DocsLinkButton,
parameters: {
layout: 'centered',
......
......@@ -3,7 +3,6 @@ import { ErrorOverlayToolbar } from './error-overlay-toolbar'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof ErrorOverlayToolbar> = {
title: 'ErrorOverlayToolbar',
component: ErrorOverlayToolbar,
parameters: {
layout: 'centered',
......
......@@ -3,7 +3,6 @@ import { NodejsInspectorButton } from './nodejs-inspector-button'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof NodejsInspectorButton> = {
title: 'ErrorOverlayToolbar/NodejsInspectorButton',
component: NodejsInspectorButton,
parameters: {
layout: 'centered',
......
......@@ -3,7 +3,6 @@ import { ErrorTypeLabel } from './error-type-label'
import { withShadowPortal } from '../../../storybook/with-shadow-portal'
const meta: Meta<typeof ErrorTypeLabel> = {
title: 'ErrorTypeLabel',
component: ErrorTypeLabel,
parameters: {
layout: 'centered',
......
......@@ -3,7 +3,6 @@ import { VersionStalenessInfo } from './VersionStalenessInfo'
import { withShadowPortal } from '../../storybook/with-shadow-portal'
const meta: Meta<typeof VersionStalenessInfo> = {
title: 'VersionStalenessInfo',
component: VersionStalenessInfo,
parameters: {
layout: 'centered',
......
......@@ -3,10 +3,12 @@ import { CallStackFrame } from './call-stack-frame'
import { withShadowPortal } from '../../storybook/with-shadow-portal'
const meta: Meta<typeof CallStackFrame> = {
title: 'CallStackFrame',
component: CallStackFrame,
parameters: {
layout: 'fullscreen',
backgrounds: {
default: 'background-100-dark',
},
},
decorators: [withShadowPortal],
}
......
......@@ -3,7 +3,6 @@ import { BuildError } from './BuildError'
import { withShadowPortal } from '../storybook/with-shadow-portal'
const meta: Meta<typeof BuildError> = {
title: 'BuildError',
component: BuildError,
parameters: {
layout: 'fullscreen',
......
......@@ -4,7 +4,6 @@ import { withShadowPortal } from '../storybook/with-shadow-portal'
import { ACTION_UNHANDLED_ERROR } from '../../../shared'
const meta: Meta<typeof Errors> = {
title: 'Errors',
component: Errors,
parameters: {
layout: 'fullscreen',
......
......@@ -3,7 +3,6 @@ import { RootLayoutMissingTagsError } from './RootLayoutMissingTagsError'
import { withShadowPortal } from '../storybook/with-shadow-portal'
const meta: Meta<typeof RootLayoutMissingTagsError> = {
title: 'RootLayoutMissingTagsError',
component: RootLayoutMissingTagsError,
parameters: {
layout: 'fullscreen',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment