CreationKit Documentation

Class Awareness​Card​Header.​Configuration

public class Configuration: ObservableObject  
AwarenessCardHeader.Configuration AwarenessCardHeader.Configuration ObservableObject ObservableObject AwarenessCardHeader.Configuration->ObservableObject

Member Of

AwarenessCardHeader

Conforms To

ObservableObject

Initializers

init(color​Provider:​image:​text:​more​Tapped:​)

public init(colorProvider: ColorProvider.Type, image: ImageAsset? = nil, text: String, moreTapped: (() -> Void)?)  

Creates a new configuration.

Parameters

color​Provider Color​Provider.​Type

Styles the header with a color. Different parts of the header use a slightly different color, so providing a ColorProvider will allow the configuration to style the header correctly.

image Image​Asset?

An image to display on the left side of the header. Provide nil if you want to hide the image.

text String

The text to display in the header.

more​Tapped (() -> Void)?

The closure that will be called when the more control is tapped. Provide nil if you want to hide the more control.

Properties

color​Provider

@Published public var colorProvider: ColorProvider.Type

Styles the header with a color. Different parts of the header use a slightly different color, so providing a ColorProvider will allow the configuration to style the header correctly.

image

@Published public var image: ImageAsset? 

An image to display on the left side of the header. Provide nil if you want to hide the image.

text

@Published public var text: String

The text to display in the header.

more​Tapped

public var moreTapped: (() -> Void)? 

The closure that will be called when the more control is tapped. Provide nil if you want to hide the more control.