vapor-community / HTMLKit-Components

This package contains common UI-components wich are build with HTMLKit.
MIT License
4 stars 1 forks source link

Add handlers to the group-component #5

Open mattesmohr opened 2 years ago

mattesmohr commented 2 years ago

Add handlers to the group-component, wich influence the children within, so you don't have to write the same property handler for each children, for example:

good:

Symbol(name: "folder-fill")
    .foregroundColor(.yellow)
Text {
    "Text"
}
.foregroundColor(.yellow)

better:


Group {
    Symbol(name: "folder-fill")
    Text {
        "Text"
    }
}
.foregroundColor(.yellow)
mattesmohr commented 2 years ago

Add a role-handler with roles like 'nav', 'toolbar' etc. for accessibility reason.