TeamItem

fun TeamItem(modifier: Modifier = Modifier, id: Int = 0, teamName: String = "", teamAbbreviation: String = "")

A composable function that displays a team item card. It shows the team's logo alongside its name and abbreviation. The logo image is dynamically retrieved based on the team ID provided.

The card is styled according to the MaterialTheme and adapts its size based on the content.

Parameters

modifier

Modifier to be applied to the card layout. It allows further customization like padding, alignment, etc.

id

The unique identifier for the team, used to fetch the team's logo from drawable resources.

teamName

The full name of the team to be displayed.

teamAbbreviation

The abbreviated name of the team, typically 2-3 letters representing the team.

Usage:

TeamItem(
id = 1,
teamName = "Los Angeles Lakers",
teamAbbreviation = "LAL"
)