Skip to content

Inheritance range #3

Closed
Closed
@eoussama

Description

@eoussama

Adding the ability to specify what to inherit and what to ignore. Sometimes you would want to inherit only the classes and ignore all other options, some other times you would want to inherit everything except for a certain option.
include and exclude are both options that go along the from option and give control over option inheritance.

Syntax

{
    children: [
        {
            ref: 'some-ref',
            name: 'input',
            classes: ['bold', 'red'],
            attributes: {
                type: 'button',
                name: 'form-input'
            }
        },
        {
            from: {
                ref: 'some-ref',
                mode: 'append',
                include: ['classes']
            }
        }
    ]
}

Data structure

  • A from option can either have an include option or exclude option, but never both at the same time.
  • A from option can have none of the options above, in that case, it should include all by default (exclude nothing).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions