Skip to content

Doc Enhancement for Style #5580

@Omzig

Description

@Omzig

Summary of the new feature / enhancement

I got this working, and i think it would be a good thing to add to the doc:

Notice the New-UDElement -Tag style -Content { style and then how it is used in the -ClassName.

New-UDApp -Title "title" -Pages $Pages -Navigation $Navigation -HeaderContent {

    New-UDElement -Tag style -Attributes @{ 
    type = 'text/css' 
} -Content {
@'
.mc-edit-nav-text { display: none !important; }
.mc-edit-nav-icon { display: inline-flex !important; }

@media (min-width: 1420px) {
    .mc-edit-nav-text { display: inline-flex !important; }
    .mc-edit-nav-icon { display: none !important; }
}
'@
    }

    Protect-UDSection -Role @('administrator') -Children {
        New-UDIconButton -Icon (New-UDIcon -Icon 'bars') -ClassName 'mc-edit-nav-icon' -OnClick {
            Show-NavConfigEditor
        } -Style @{ color = 'inherit' }
        New-UDButton -Text 'Edit Navigation' -Icon (New-UDIcon -Icon 'bars') -ClassName 'mc-edit-nav-text' -Variant outlined -Color inherit -Size small -OnClick {
            Show-NavConfigEditor
        }
    }
}

Proposed technical implementation details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-AppsThis issue is related to apps (dashboards).Area-DocumentationImprovements or additions to documentation

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions