Skip to content

Add public _ModifierStack type#998

Merged
carson-katri merged 4 commits intomainfrom
public-builtin-registry
Jun 29, 2023
Merged

Add public _ModifierStack type#998
carson-katri merged 4 commits intomainfrom
public-builtin-registry

Conversation

@carson-katri
Copy link
Copy Markdown
Member

@carson-katri carson-katri commented Jun 29, 2023

This adds a new type that can be used by add-on libraries that enables modifiers to be passed as an argument to another modifier.

For example, the chart_plot_style modifier in Swift Charts accepts modifiers as an argument:

chart_plot_style(
  aspect_ratio(1, content_mode: :fit) |> frame(height: 200)
)

See liveview-native/liveview-native-swiftui-charts#96 for the implementation of this modifier.

@carson-katri carson-katri requested a review from a team June 29, 2023 18:54
Copy link
Copy Markdown
Contributor

@supernintendo supernintendo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@carson-katri carson-katri merged commit 307d322 into main Jun 29, 2023
@carson-katri carson-katri deleted the public-builtin-registry branch June 29, 2023 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants