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.
Relationships
Conforms To
View
Initializers
init(renderingType:renderingSize:tintColor:)
public init(renderingType: DSIconRenderingType = .none, renderingSize: DSIconRenderingSize = .size20, tintColor: Color? = nil)
Initializes and returns a newly allocated Icon with the specified renderingType.
Parameters
Name | Type | Description |
---|---|---|
renderingType | DSIconRenderingType |
The renderingType to style the component. |
renderingSize | DSIconRenderingSize |
The renderingSize to set the size the component. |
tintColor | Color? |
The tint color of the component. |
Properties
body
public var body: some View