commonMain.io.github.lyxnx.compose.pine.BadgeDefaults.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pine-badges Show documentation
Show all versions of pine-badges Show documentation
Jetpack Compose Pine Theme badge components
The newest version!
package io.github.lyxnx.compose.pine
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
/**
* Contains the default values used by a [Badge]
*/
public object BadgeDefaults {
/**
* The default padding values used by a [Badge]
*/
public val ContentPadding: PaddingValues = PaddingValues(10.dp)
/**
* Creates a [BadgeColors] instance using primary theme colors that represents the colors in different states
*/
@Composable
public fun badgeColors(
backgroundColor: Color = PineTheme.colors.primary100,
borderColor: Color = PineTheme.colors.primary100,
contentColor: Color = PineTheme.colors.primary500
): BadgeColors = BadgeColors(
backgroundColor = backgroundColor,
borderColor = borderColor,
contentColor = contentColor
)
/**
* Creates an outlined [BadgeColors] instance using primary theme colors that represents the colors in different states
*/
@Composable
public fun outlineBadgeColors(
backgroundColor: Color = Color.Unspecified,
borderColor: Color = PineTheme.colors.primary400,
contentColor: Color = PineTheme.colors.primary500
): BadgeColors = BadgeColors(
backgroundColor = backgroundColor,
borderColor = borderColor,
contentColor = contentColor
)
}