commonMain.io.github.lyxnx.compose.pine.RadioButtonDefaults.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pine Show documentation
Show all versions of pine Show documentation
Jetpack Compose Pine Theme
package io.github.lyxnx.compose.pine
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import io.github.lyxnx.compose.ui.AnimatedInteractionStateColorSelector
/**
* Contains the default values used by a [RadioButton]
*/
public object RadioButtonDefaults {
/**
* Creates a [RadioButtonColors] instance that represents the colors in different states
*/
@Composable
public fun radioButtonColors(
unselectedBorderColor: Color = PineTheme.colors.grey300,
pressedUnselectedBorderColor: Color = PineTheme.colors.primary500,
focusedUnselectedBorderColor: Color = PineTheme.colors.primary500,
disabledUnselectedBorderColor: Color = PineTheme.colors.grey300,
selectedBorderColor: Color = PineTheme.colors.primary500,
pressedSelectedBorderColor: Color = PineTheme.colors.primary600,
focusedSelectedBorderColor: Color = PineTheme.colors.primary400,
disabledSelectedBorderColor: Color = PineTheme.colors.grey300,
unselectedBackgroundColor: Color = PineTheme.colors.background,
pressedUnselectedBackgroundColor: Color = PineTheme.colors.primary100,
focusedUnselectedBackgroundColor: Color = PineTheme.colors.background,
disabledUnselectedBackgroundColor: Color = PineTheme.colors.grey300,
selectedBackgroundColor: Color = PineTheme.colors.primary500,
pressedSelectedBackgroundColor: Color = PineTheme.colors.primary600,
focusedSelectedBackgroundColor: Color = PineTheme.colors.primary400,
disabledSelectedBackgroundColor: Color = PineTheme.colors.grey300,
indicatorColor: Color = PineTheme.colors.white,
pressedIndicatorColor: Color = PineTheme.colors.white,
focusedIndicatorColor: Color = PineTheme.colors.white,
disabledIndicatorColor: Color = PineTheme.colors.background,
focusedShadowColor: Color = PineTheme.colors.primary600.copy(alpha = 0.5f)
): RadioButtonColors = RadioButtonColors(
unselectedBorderColor = AnimatedInteractionStateColorSelector(
default = unselectedBorderColor,
pressed = pressedUnselectedBorderColor,
focused = focusedUnselectedBorderColor,
disabled = disabledUnselectedBorderColor
),
selectedBorderColor = AnimatedInteractionStateColorSelector(
default = selectedBorderColor,
pressed = pressedSelectedBorderColor,
focused = focusedSelectedBorderColor,
disabled = disabledSelectedBorderColor
),
unselectedBackgroundColor = AnimatedInteractionStateColorSelector(
default = unselectedBackgroundColor,
pressed = pressedUnselectedBackgroundColor,
focused = focusedUnselectedBackgroundColor,
disabled = disabledUnselectedBackgroundColor
),
selectedBackgroundColor = AnimatedInteractionStateColorSelector(
default = selectedBackgroundColor,
pressed = pressedSelectedBackgroundColor,
focused = focusedSelectedBackgroundColor,
disabled = disabledSelectedBackgroundColor
),
indicatorColor = AnimatedInteractionStateColorSelector(
default = indicatorColor,
pressed = pressedIndicatorColor,
focused = focusedIndicatorColor,
disabled = disabledIndicatorColor
),
focusedShadowColor = focusedShadowColor
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy