FileUpload
Functions
Link copied to clipboard
fun Button(onResult: (ImmutableList<UploadedFile>) -> Unit, label: String, modifier: Modifier = Modifier, size: ButtonSize = ButtonSize.Medium, icon: SparkIcon? = null, iconSide: IconSide = IconSide.START, type: FileUploadType = FileUploadType.File(), maxFiles: Int? = null, title: String? = null, directory: PlatformFile? = null, dialogSettings: FileKitDialogSettings = FileKitDialogSettings.createDefault(), enabled: Boolean = true, onClickLabel: String? = null, buttonContent: @Composable (onClick: () -> Unit) -> Unit = { onClick ->
ButtonFilled(
modifier = Modifier
.fillMaxWidth()
.ifNotNull(onClickLabel) {
semantics { onClick(label = onClickLabel, action = null) }
},
onClick = onClick,
text = label,
intent = ButtonIntent.Support,
enabled = enabled,
)
})
High level file upload component for multiple file selection.
Link copied to clipboard
fun ButtonSingleSelect(onResult: (UploadedFile?) -> Unit, label: String, modifier: Modifier = Modifier, size: ButtonSize = ButtonSize.Medium, icon: SparkIcon? = null, iconSide: IconSide = IconSide.START, type: FileUploadType = FileUploadType.File(), title: String? = null, directory: PlatformFile? = null, dialogSettings: FileKitDialogSettings = FileKitDialogSettings.createDefault(), enabled: Boolean = true, onClickLabel: String? = null, buttonContent: @Composable (onClick: () -> Unit) -> Unit = { onClick ->
ButtonFilled(
modifier = Modifier
.fillMaxWidth()
.ifNotNull(onClickLabel) {
semantics { onClick(label = onClickLabel, action = null) }
},
onClick = onClick,
text = label,
intent = ButtonIntent.Support,
enabled = enabled,
)
})
High level file upload component for single file selection.