Workday/canvas-kit

defaultModifiers doesn't have extended modifiers in type

Closed this issue ยท 0 comments

๐Ÿ› Bug Report

In extended stencil it shows ts error when using modifier from base stencil inside defaultModifiers.

const textStencil = createStencil({
  base: {},
  modifiers: {
    "type": {
      "title.large": {}
    }
  }
});

const labelStencil = createStencil({
  extends: textStencil,
  base: {},
  modifiers: {variant: {"inverse": {}}}
  // the next line shows issue
  // that type `{type: "title.large"}` is not compatible with `{variant: {"inverse": {}}}`
  defaultModifiers: {type: "title.large"}
}

To Reproduce

Steps to reproduce the behavior:

Expected Behavior

A clear and concise description of what you expected to happen.

Actual Results

A clear and concise description of what actually happens

Browser (if applicable)

If this was a visual bug, what browser did you spot it on?

Link to repl or repo (highly encouraged)

Please provide a reference to a repo or branch to help us reproduce this bug.

Error Output

Paste the error output here

or

Include a screenshot of a visual bug