diff --git a/src/components/SyncStatusCardExecution.stories.tsx b/src/components/SyncStatusCardExecution.stories.tsx new file mode 100644 index 00000000..febdb790 --- /dev/null +++ b/src/components/SyncStatusCardExecution.stories.tsx @@ -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 => ( +
+ +
+ ), + ], +} satisfies Meta + +export default meta +type Story = StoryObj + +export const WithData: Story = { + args: { + synced: 132432, + total: 200000, + }, +} +export const WithoutData: Story = { + args: { + synced: 0, + total: 0, + }, +} + + diff --git a/src/components/SyncStatusCardExecution.tsx b/src/components/SyncStatusCardExecution.tsx index 94a04156..684c5fb8 100644 --- a/src/components/SyncStatusCardExecution.tsx +++ b/src/components/SyncStatusCardExecution.tsx @@ -20,7 +20,7 @@ const SyncStatusCardExecution: React.FC = ({ synced, t { id: 'storage', label: 'Free', - value: total - synced, + value: total - synced || 1, color: '#E7EAEE', }, ]