Skip to content

How to horizontally align section within a container? #106

Open
@kkyr

Description

@kkyr

How can I horizontally align to the center a section that is within a container?

struct KeyBindingsView: View {
    private let contentWidth =  500.0
    
    var body: some View {
        Settings.Container(contentWidth: contentWidth) {
            Settings.Section(title: "Section Title:") {
                Settings.Section(title: "") {
                    KeyboardShortcuts.Recorder(for: .activate)
                    Text("Do something.")
                        .settingDescription()
                }
            }
        }
    }
}

Screenshot 2023-08-03 at 01 34 40

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions