Skip to content
ppraveentr edited this page Apr 2, 2023 · 6 revisions

Extensions on View

Methods

theme(_:)

Call this function to set the Color's based on ColorModifierStyle enum

func theme(_ color: ColorModifierStyle) -> some View 

Parameters

  • name: Configured ColorModifierStyle with ColorSchemeValue color

Returns

Modified View that incorporates modifier.

theme(_:)

Call this function to set the Color's based on ColorSchemeValue

func theme(_ font: ColorSchemeValue<Font>?) -> some View 

Parameters

  • name: Configured ligh and dark mode value for Font

Returns

Modified View that incorporates the view modifier.

style(_:)

Call this function to set the style for the elements by using the current body of the caller that will have the modifier applied to it.

func style(_ name: String) -> some View 

Parameters

  • name: StyleName for the element

Returns

Modified View that incorporates the view modifier.