-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Compose] - Add Gauges #289
Conversation
Scythe14
commented
Oct 30, 2023
•
edited
Loading
edited
library-compose/src/main/java/com/spendesk/grapes/compose/gauge/GrapesGauge.kt
Outdated
Show resolved
Hide resolved
library-compose/src/main/java/com/spendesk/grapes/compose/gauge/GrapesGauge.kt
Show resolved
Hide resolved
@Composable | ||
fun GrapesGauge( | ||
progress: Float, | ||
color: Color, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposal:
a single GrapesGauge that takes a color: GaugeColor
GaugeColor is a sealed class :
sealed class GaugeColor {
data class Solid(val color: Color): GaugeColor
data class Stripped(stripeColor: Color, stripeColorSecondary: Color, stripSpacing: Dp): GaugeColor
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to provide potentially multiple Gauges, so maybe in that case a List ?
library-compose/src/main/java/com/spendesk/grapes/compose/gauge/GrapesGauge.kt
Show resolved
Hide resolved
- Add GrapesGauge that displays a list of gauges - Make private all other gauges for clarity
…into task/compose-gauges