mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
debug output stories, main merged
This commit is contained in:
parent
e71695fed5
commit
5231f43648
27
src/components/@shared/DebugOutput/index.stories.tsx
Normal file
27
src/components/@shared/DebugOutput/index.stories.tsx
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
||||||
|
import DebugOutput, { DebugOutputProps } from '@shared/DebugOutput'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
title: 'Component/@shared/DebugOutput',
|
||||||
|
component: DebugOutput
|
||||||
|
} as ComponentMeta<typeof DebugOutput>
|
||||||
|
|
||||||
|
const Template: ComponentStory<typeof DebugOutput> = (
|
||||||
|
args: DebugOutputProps
|
||||||
|
) => <DebugOutput {...args} />
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
args: DebugOutputProps
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Default: Props = Template.bind({})
|
||||||
|
Default.args = {
|
||||||
|
output: <p>Your Debug Data </p>
|
||||||
|
}
|
||||||
|
|
||||||
|
export const WithTitle: Props = Template.bind({})
|
||||||
|
WithTitle.args = {
|
||||||
|
title: 'Debug Data',
|
||||||
|
output: <p>Your Debug Data </p>
|
||||||
|
}
|
@ -1,12 +1,14 @@
|
|||||||
import React, { ReactElement } from 'react'
|
import React, { ReactElement } from 'react'
|
||||||
|
|
||||||
|
export interface DebugOutputProps {
|
||||||
|
title?: string
|
||||||
|
output: any
|
||||||
|
}
|
||||||
|
|
||||||
export default function DebugOutput({
|
export default function DebugOutput({
|
||||||
title,
|
title,
|
||||||
output
|
output
|
||||||
}: {
|
}: DebugOutputProps): ReactElement {
|
||||||
title?: string
|
|
||||||
output: any
|
|
||||||
}): ReactElement {
|
|
||||||
return (
|
return (
|
||||||
<div style={{ marginTop: 'var(--spacer)' }}>
|
<div style={{ marginTop: 'var(--spacer)' }}>
|
||||||
{title && <h5>{title}</h5>}
|
{title && <h5>{title}</h5>}
|
Loading…
x
Reference in New Issue
Block a user