-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: display a component if the feedback is not ready for review.
- Loading branch information
1 parent
deddcd3
commit f808c27
Showing
13 changed files
with
164 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
openfeedback-m3/src/commonMain/kotlin/io/openfeedback/m3/FeedbackNotReady.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
package io.openfeedback.m3 | ||
|
||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.Spacer | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.material.icons.Icons | ||
import androidx.compose.material.icons.filled.SentimentDissatisfied | ||
import androidx.compose.material.icons.filled.SentimentNeutral | ||
import androidx.compose.material.icons.filled.SentimentSatisfied | ||
import androidx.compose.material.icons.filled.SentimentVeryDissatisfied | ||
import androidx.compose.material.icons.filled.SentimentVerySatisfied | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.unit.dp | ||
import io.openfeedback.resources.LocalStrings | ||
|
||
@Composable | ||
fun FeedbackNotReady( | ||
modifier: Modifier = Modifier, | ||
containerColor: Color = MaterialTheme.colorScheme.surfaceContainerHigh, | ||
contentPadding: PaddingValues = PaddingValues(32.dp) | ||
) { | ||
Surface(modifier = modifier, color = containerColor) { | ||
Column( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.padding(contentPadding), | ||
) { | ||
Box( | ||
modifier = Modifier.fillMaxWidth(), | ||
contentAlignment = Alignment.Center | ||
) { | ||
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { | ||
Icon( | ||
imageVector = Icons.Default.SentimentVerySatisfied, | ||
contentDescription = null, | ||
modifier = Modifier.size(32.dp) | ||
) | ||
Icon( | ||
imageVector = Icons.Default.SentimentSatisfied, | ||
contentDescription = null, | ||
modifier = Modifier.size(32.dp) | ||
) | ||
Icon( | ||
imageVector = Icons.Default.SentimentNeutral, | ||
contentDescription = null, | ||
modifier = Modifier.size(32.dp) | ||
) | ||
Icon( | ||
imageVector = Icons.Default.SentimentDissatisfied, | ||
contentDescription = null, | ||
modifier = Modifier.size(32.dp) | ||
) | ||
Icon( | ||
imageVector = Icons.Default.SentimentVeryDissatisfied, | ||
contentDescription = null, | ||
modifier = Modifier.size(32.dp) | ||
) | ||
} | ||
} | ||
Spacer(modifier = Modifier.height(16.dp)) | ||
Text( | ||
text = LocalStrings.current.strings.notReady.title, | ||
style = MaterialTheme.typography.titleMedium | ||
) | ||
Text(text = LocalStrings.current.strings.notReady.description) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.