Add story for consensus
This commit is contained in:
parent
59bcd20428
commit
91ceef7e72
|
@ -0,0 +1,37 @@
|
|||
import type { Meta, StoryObj } from '@storybook/react'
|
||||
|
||||
import SyncStatusCardConsensus from './SyncStatusCardConsensus'
|
||||
|
||||
const meta = {
|
||||
title: 'General/SyncStatusCardConsensus',
|
||||
component: SyncStatusCardConsensus,
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
tags: ['autodocs'],
|
||||
decorators: [
|
||||
Story => (
|
||||
<div style={{ height: '25vh' }}>
|
||||
<Story />
|
||||
</div>
|
||||
),
|
||||
],
|
||||
} satisfies Meta<typeof SyncStatusCardConsensus>
|
||||
|
||||
export default meta
|
||||
type Story = StoryObj<typeof meta>
|
||||
|
||||
export const WithData: Story = {
|
||||
args: {
|
||||
synced: 132432,
|
||||
total: 200000,
|
||||
},
|
||||
}
|
||||
export const WithoutData: Story = {
|
||||
args: {
|
||||
synced: 0,
|
||||
total: 0,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ const SyncStatusCardConsensus: React.FC<DeviceStorageHealthProps> = ({ synced, t
|
|||
{
|
||||
id: 'storage',
|
||||
label: 'Free',
|
||||
value: total - synced,
|
||||
value: total - synced || 1,
|
||||
color: '#E7EAEE',
|
||||
},
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue