Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ internal val QuestionnaireItemComponent.maxSizeInMiBs: BigDecimal?
get() = maxSizeInBytes?.div(BYTES_PER_MIB)

/** The default maximum size of an attachment is 1 Mebibytes. */
private val DEFAULT_SIZE = BigDecimal(1048576)
internal val DEFAULT_SIZE = BigDecimal(1048576)

/** Returns true if given size is above maximum size allowed. */
internal fun QuestionnaireItemComponent.isGivenSizeOverLimit(
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.google.android.fhir.datacapture.views.compose

import androidx.compose.foundation.layout.padding
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.dimensionResource
import com.google.android.fhir.datacapture.R

@Composable
internal fun ErrorText(validationMessage: String) {
Text(
text = validationMessage,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.error,
modifier =
Modifier.padding(start = dimensionResource(R.dimen.error_text_margin_horizontal))
.testTag(ERROR_TEXT_TAG),
)
}

const val ERROR_TEXT_TAG = "error_text"
Loading
Loading