Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add public _ModifierStack type #998

Merged
merged 4 commits into from
Jun 29, 2023
Merged

Add public _ModifierStack type #998

merged 4 commits into from
Jun 29, 2023

Conversation

carson-katri
Copy link
Contributor

@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
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