Skip to content

[Refacto] Mutualize the way the component is demonstarted in demo app by carting a common View #546

Open
@ludovic35

Description

@ludovic35

For each component we have same code :

     HStack(alignment: .center) {
            Spacer()
                 <THE_COMPONENT_TO_DEMO>
                .disabled(!model.enabled)
            Spacer()
        }
        .padding(.all, theme.spaces.spaceFixedMedium)
        .designToolboxBackground(onColoredSurface: false)
    }

The idea is to mutualize this code and to have <THE_COMPONENT_TO_DEMO> in a view that use the componnent according to the model of the configuration. Then, this view can be use later by UI tests where all values of the view model will be tested.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions