EnterpriseDS Documentation

Structure DSUIIcon

@available(iOS 13.0, tvOS 13.0, *)
public struct DSUIIcon: View  

An Enterprise-styled drop-in replacement for a SwiftUI Image that displays a standard Enterprise icon (DSIconRenderingType).

Initialize with a rendering type to specify the image displayed. The default intrinsic size is 20x20, but can be overridden by specifying a renderingSize. A rendering size of .size24 would size the icon at 24x24.

DSUIIcon(renderingType: .error, renderingSize: .size16, tintColor: .statusError)

DSUIIcon(renderingType: .phone)

Icons have a default black tint and it's recommended that you specify one.

DSUIIcon DSUIIcon View View DSUIIcon->View

Conforms To

View

Initializers

init(rendering​Type:​rendering​Size:​tint​Color:​)

public init(renderingType: DSIconRenderingType = .none, renderingSize: DSIconRenderingSize = .size20, tintColor: Color? = nil)  

Initializes and returns a newly allocated Icon with the specified renderingType.

Parameters

rendering​Type DSIcon​Rendering​Type

The renderingType to style the component.

rendering​Size DSIcon​Rendering​Size

The renderingSize to set the size the component.

tint​Color Color?

The tint color of the component.

Properties

body

public var body: some View