ShoppableImageItem

data class ShoppableImageItem<T>(val key: T, @FloatRange(from = 0.0, to = 1.0) val xCoordinate: Float, @FloatRange(from = 0.0, to = 1.0) val yCoordinate: Float, val content: @Composable () -> Unit, val contentDescription: String? = null, val onClick: () -> Unit? = null)

Shoppable image item data class. This is is used together with the ShoppableImage component to display products or other information on top of an image.

Constructors

Link copied to clipboard
constructor(key: T, @FloatRange(from = 0.0, to = 1.0) xCoordinate: Float, @FloatRange(from = 0.0, to = 1.0) yCoordinate: Float, content: @Composable () -> Unit, contentDescription: String? = null, onClick: () -> Unit? = null)

Properties

Link copied to clipboard
val content: @Composable () -> Unit

Composable content for the product to display. Recommended to use mergeDescendants or in the case of Price Module component use the custom param mergeAllDescendants.

Link copied to clipboard

ContentDescription to add to the dot.

Link copied to clipboard
val key: T

Generic key to identify a product tag.

Link copied to clipboard
val onClick: () -> Unit? = null

Click action for click on product tag.

Link copied to clipboard

X coordinate for dot placement as percentage. A value of 0.0f or 1.0f will make the dot not show since it will try to center the dot on the border.

Link copied to clipboard

Y coordinate for dot placement as percentage. A value of 0.0f or 1.0f will make the dot not show since it will try to center the dot on the border.