modifier(_:)
Attach a PreviewModifier to the preview.
Declaration
@MainActor static func modifier(_ modifier: some PreviewModifier) -> PreviewTrait<T>Discussion
You can compose modifiers by passing more than one instance of this trait. Composed modifiers will be applied to the preview in order: the first modifier will apply to the body of the preview, the second modifier to the body of the first modifier, and so on.