This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
skynet-webportal/packages/dashboard-v2/src/components/Panel/Panel.stories.js

66 lines
1.3 KiB
JavaScript
Raw Normal View History

import { Panel } from './Panel'
export default {
title: 'SkynetLibrary/Panel',
component: Panel,
decorators: [
(Story) => (
<div className="inset-0 bg-palette-100 p-6">
<div style={{ maxWidth: 800 }}>
<Story />
</div>
</div>
),
],
}
const SampleContent = () => (
<>
<p>This is the first paragraph</p>
<p>This is the second paragraph</p>
<p>This is the third paragraph</p>
</>
)
const Template = (args) => (
<Panel {...args}>
<SampleContent />
</Panel>
)
export const RawPanel = Template.bind({})
RawPanel.args = {}
export const TitledPanel = Template.bind({})
TitledPanel.args = {
title: 'Latest activity',
}
export const InlinePanelsExample = () => (
<div className="grid gap-4 grid-flow-col auto-cols-fr">
<Panel title="Upload" className="w-50">
<SampleContent />
</Panel>
<Panel title="Usage" className="w-50">
<SampleContent />
</Panel>
</div>
)
export const FullWidthPanelsExample = () => (
<>
<Panel title="Latest activity">
<SampleContent />
</Panel>
<Panel title="Payment history">
<SampleContent />
</Panel>
</>
)
export const CustomPanelBackground = Template.bind({})
CustomPanelBackground.args = {
className: 'bg-red-500',
title: 'Background below should be red',
}