Skip to content

Commit e814bee

Browse files
siddh1004sagarwal
andauthored
Rename AnswerChipsGroup to MedicalHistoryQuestionOptions (#5594)
Co-authored-by: sagarwal <[email protected]>
1 parent 5cf7907 commit e814bee

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

app/src/main/java/org/simple/clinic/medicalhistory/ui/MedicalHistoryDiagnosisWithTreatment.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fun MedicalHistoryDiagnosisWithTreatment(
5656
color = MaterialTheme.colors.onSurface,
5757
)
5858

59-
AnswerChipsGroup(
59+
MedicalHistoryQuestionOptions(
6060
modifier = Modifier.align(Alignment.End),
6161
selectedAnswer = diagnosisAnswer,
6262
onSelectionChange = { newAnswer ->
@@ -88,7 +88,7 @@ fun MedicalHistoryDiagnosisWithTreatment(
8888
color = MaterialTheme.colors.onSurface,
8989
)
9090

91-
AnswerChipsGroup(
91+
MedicalHistoryQuestionOptions(
9292
modifier = Modifier.align(Alignment.End),
9393
selectedAnswer = treatmentAnswer,
9494
onSelectionChange = { newAnswer ->

app/src/main/java/org/simple/clinic/medicalhistory/ui/MedicalHistoryQuestionItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fun MedicalHistoryQuestionItem(
4545
overflow = TextOverflow.Ellipsis,
4646
)
4747

48-
AnswerChipsGroup(
48+
MedicalHistoryQuestionOptions(
4949
selectedAnswer = selectedAnswer,
5050
onSelectionChange = { newAnswer ->
5151
if (newAnswer == selectedAnswer) {

app/src/main/java/org/simple/clinic/medicalhistory/ui/MedicalHistoryAnswerChip.kt renamed to app/src/main/java/org/simple/clinic/medicalhistory/ui/MedicalHistoryQuestionOptions.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import org.simple.clinic.R
2020
import org.simple.clinic.medicalhistory.Answer
2121

2222
@Composable
23-
fun AnswerChipsGroup(
23+
fun MedicalHistoryQuestionOptions(
2424
modifier: Modifier = Modifier,
2525
selectedAnswer: Answer?,
2626
onSelectionChange: (Answer) -> Unit
@@ -30,15 +30,15 @@ fun AnswerChipsGroup(
3030
horizontalArrangement = Arrangement.spacedBy(dimensionResource(R.dimen.spacing_8)),
3131
verticalAlignment = Alignment.CenterVertically,
3232
) {
33-
MedicalHistoryAnswerChip(
33+
MedicalHistoryQuestionOption(
3434
label = stringResource(R.string.newmedicalhistory_yes),
3535
selected = selectedAnswer == Answer.Yes,
3636
onSelectionChange = {
3737
onSelectionChange(Answer.Yes)
3838
}
3939
)
4040

41-
MedicalHistoryAnswerChip(
41+
MedicalHistoryQuestionOption(
4242
label = stringResource(R.string.newmedicalhistory_no),
4343
selected = selectedAnswer == Answer.No,
4444
onSelectionChange = {
@@ -50,7 +50,7 @@ fun AnswerChipsGroup(
5050

5151
@OptIn(ExperimentalMaterialApi::class)
5252
@Composable
53-
fun MedicalHistoryAnswerChip(
53+
fun MedicalHistoryQuestionOption(
5454
label: String,
5555
selected: Boolean,
5656
onSelectionChange: () -> Unit

0 commit comments

Comments
 (0)