Skip to content

Style for wrapped dcc-components #193

@jorgenherje

Description

@jorgenherje

Style argument does not work properly for wrapped components.

dcc (dash-core-components) are wrapped and placed in webviz_core_components/wrapped_components-folder. For wrapped components with label argument, the html.Label is first child in children list, and the wrapped component is appended afterwards. The style argument does not handle styling properly, as they seem to be appended to the wrapped component only.


Example:
For wrapped wcc.RadioItems the html.Label is added if provided, and thereafter the dcc.RadioItems is added to childrens list. If style={"margin-top": "10px", "margin-bottom": "10px"} is provided, the margin-top setting is applied on the dcc.RadioItems, which introduce spacing between label and radio items.

  • ISSUE: Spacing between label and RadioItems:
    image

  • WANTED: Spacing above label and below RadioItems:
    image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog 📝

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions