dasautoooo / Parma

A SwiftUI view for displaying Markdown with customizable appearances.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

As a user, I'd like to have .leading alignment by default, not .center

sashamitrovich opened this issue · comments

This is fantastic, thank you so much!

I noticed that ,by default, the render is centered, which is uncommon, I believe.
How can I change that to leading?

Ideally, .leading should be the default render without the need for any configuration.
Once again, thanks for this fantastic work and building such a simple SwiftUI component.

Hi Saša,

Thank you for your feedback. Technically, the Parma view returns a ForEach view which contains all the view that ParmaCore composed.
You can use a VStack to properly align those views.

VStack(alignment: .leading) {
    Parma(markdown)
}

Actually, I agree with you, so I'm planning to add alignment in version 1.0.

Thanks again!

Hi @sashamitrovich ,

In the latest release (v0.2.0), Parma has an alignment parameter which default value is .leading.

Thank you again!