Open markst opened 2 months ago
Most of our previews look fine in preview without any additional attributes:
#Preview { ShowMetaStack( showModel: ShowModel.featureMockData, nowNextModel: .success(.init()), actionsRowModel: .withReminderMockData, playButtonAction: { }, actions: .init( shareAction: nil, watchlistAction: nil, reminderAction: nil ) ) .preferredColorScheme(.dark) }
Our generated snapshots appear with white background and default device resolution:
Without needing to apply preview layout and background colours too all our previews:
.previewLayout(.sizeThatFits) .background(.red)
I wonder if can add to the config in order to apply global attributes to all our previews which generate snapshots
Ah actually might add that the new syntax is:
#Preview(traits: .sizeThatFitsLayout) { VStack { ActionButtonsRow(
Does actually pump out assets right size:
Context 🕵️♀️
Most of our previews look fine in preview without any additional attributes:
What 🌱
Our generated snapshots appear with white background and default device resolution:
Proposal 🎉
Without needing to apply preview layout and background colours too all our previews:
I wonder if can add to the config in order to apply global attributes to all our previews which generate snapshots