// Copyright 2024 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { type ComponentProps } from 'react'; import type { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { BackupMediaDownloadProgress } from './BackupMediaDownloadProgress'; import { KIBIBYTE } from '../types/AttachmentSize'; import { WidthBreakpoint } from './_util'; const { i18n } = window.SignalContext; type PropsType = ComponentProps; function Template(args: PropsType): JSX.Element { return ( <>

Wide

Medium

Narrow

); } export default { title: 'Components/BackupMediaDownloadProgress', args: { isPaused: false, isOnline: true, downloadedBytes: 600 * KIBIBYTE, totalBytes: 1000 * KIBIBYTE, handleClose: action('handleClose'), handlePause: action('handlePause'), handleResume: action('handleResume'), handleCancel: action('handleCancel'), i18n, }, } satisfies Meta; export function InProgress(args: PropsType): JSX.Element { return