Class
AwarenessCardHeader.Configuration
public class Configuration: ObservableObject
Relationships
Member Of
AwarenessCardHeader
Conforms To
ObservableObject
Initializers
init(colorProvider:image:text:moreTapped:)
public init(colorProvider: ColorProvider.Type, image: ImageAsset? = nil, text: String, moreTapped: (() -> Void)?)
Creates a new configuration.
Parameters
Name | Type | Description |
---|---|---|
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 | ImageAsset? |
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. |
moreTapped | (() -> Void)? |
The closure that will be called when the more control is tapped. Provide nil if you want to hide the more control. |
Properties
colorProvider
@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.
moreTapped
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.