mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-01-20 16:30:34 +00:00
Add story for execution
This commit is contained in:
parent
91ceef7e72
commit
f07c7629e0
37
src/components/SyncStatusCardExecution.stories.tsx
Normal file
37
src/components/SyncStatusCardExecution.stories.tsx
Normal file
@ -0,0 +1,37 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react'
|
||||
|
||||
import SyncStatusCardExecution from './SyncStatusCardExecution'
|
||||
|
||||
const meta = {
|
||||
title: 'General/SyncStatusCardExecution',
|
||||
component: SyncStatusCardExecution,
|
||||
parameters: {
|
||||
layout: 'centered',
|
||||
},
|
||||
tags: ['autodocs'],
|
||||
decorators: [
|
||||
Story => (
|
||||
<div style={{ height: '25vh' }}>
|
||||
<Story />
|
||||
</div>
|
||||
),
|
||||
],
|
||||
} satisfies Meta<typeof SyncStatusCardExecution>
|
||||
|
||||
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,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ const SyncStatusCardExecution: React.FC<DeviceStorageHealthProps> = ({ synced, t
|
||||
{
|
||||
id: 'storage',
|
||||
label: 'Free',
|
||||
value: total - synced,
|
||||
value: total - synced || 1,
|
||||
color: '#E7EAEE',
|
||||
},
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user