All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.io.github.lyxnx.compose.pine.BadgeDefaults.kt Maven / Gradle / Ivy

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
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy