mattermost-mobile/ios/MattermostShare/Views/ContentViews/AttachmentsViews/FileThumbnail.swift
Rajat Dabade abb8fc84e9
(IOS) Consistent component for upload item for share extension (#9030)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-08-11 16:56:46 +05:30

32 lines
709 B
Swift

//
// FileThumbnail.swift
// MattermostShare
//
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.//
import SwiftUI
struct FileThumbnail: View {
var small = false
var attachment: AttachmentModel
var hasError: Bool
var body: some View {
if small {
// Small mode: Use AttachmentInfoView with fixed width
AttachmentInfoView(
attachment: attachment,
hasError: hasError,
fullWidth: false
)
} else {
// Full mode: Use AttachmentInfoView with full width
AttachmentInfoView(
attachment: attachment,
hasError: hasError,
fullWidth: true
)
}
}
}