import React from 'react' import { Meta, StoryObj } from '@storybook/react' import JsonView from '../index' import '../dark.css' import { argTypes } from './share' type TYPE_FC = typeof JsonView export default { title: 'Themes', component: JsonView, argTypes, args: { enableClipboard: true, editable: true, src: { string: 'string', longString: 'long string long string long string long string long string long string', number: 123456, boolean: false, null: null, func: function () { console.log('Hello World') }, Symbol: Symbol('JSON View'), obj: { k1: 123, k2: '123', k3: false }, arr: ['string', 123456, false, null] } } } as Meta export const Default: StoryObj = { args: { theme: 'default' }, decorators: [ Story => (
) ] } export const Default_Dark: StoryObj = { args: { theme: 'default', dark: true }, decorators: [ Story => (
) ] } export const Accessibility: StoryObj = { args: { theme: 'a11y' }, decorators: [ Story => (
) ] } export const Accessibility_Dark: StoryObj = { args: { theme: 'a11y', dark: true }, decorators: [ Story => (
) ] } export const Github: StoryObj = { args: { theme: 'github' }, decorators: [ Story => (
) ] } export const Github_Dark: StoryObj = { args: { theme: 'github', dark: true }, decorators: [ Story => (
) ] } export const Vscode: StoryObj = { args: { theme: 'vscode' }, decorators: [ Story => (
) ] } export const Vscode_Dark: StoryObj = { args: { theme: 'vscode', dark: true }, decorators: [ Story => (
) ] } export const Atom: StoryObj = { args: { theme: 'atom' }, decorators: [ Story => (
) ] } export const Atom_Dark: StoryObj = { args: { theme: 'atom', dark: true }, decorators: [ Story => (
) ] } export const Winter_is_Coming: StoryObj = { args: { theme: 'winter-is-coming' }, decorators: [ Story => (
) ] } export const Winter_is_Coming_Dark: StoryObj = { args: { theme: 'winter-is-coming', dark: true }, decorators: [ Story => (
) ] }