Interactive testing environment for react-shared components
Current: Default
Digital download assets preview component showing file information with smart file type detection
View the component with sample digital download data
Different digital download preview scenarios
productobject - Digital download data with digital_assets array containing file information
previewboolean - Preview mode flag (default: false)
usernamestring - Username (optional, currently unused)
classNamestring - Additional CSS classes (optional)
The component automatically detects file types based on extensions and displays appropriate labels:
When multiple files are included, the component shows "X files included" instead of individual file names. For single files, it displays the detected file type.
The component expects a product object with the following structure:
{
digital_download: {
digital_assets: [
{ name: "file1.pdf" },
{ name: "file2.zip" },
// ... more files
]
}
}The component uses translation keys for file count and default messages:
shared.digital_download.files_included - For multiple filesshared.digital_download.ready_to_download - Default messageAll file types display the same digital download icon, regardless of the file extension. The icon is styled with the accent2 background color.