Add story for execution

This commit is contained in:
Hristo Nedelkov 2023-08-15 13:23:20 +03:00
parent 91ceef7e72
commit f07c7629e0
2 changed files with 38 additions and 1 deletions

View 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,
},
}

View File

@ -20,7 +20,7 @@ const SyncStatusCardExecution: React.FC<DeviceStorageHealthProps> = ({ synced, t
{
id: 'storage',
label: 'Free',
value: total - synced,
value: total - synced || 1,
color: '#E7EAEE',
},
]