ink-cartridge
    Preparing search index...

    Function applyElement

    • Apply an element to a registered layer.

      props is type-checked against the element component's own prop type — the same type-safety pattern skip() uses for params.

      Type Parameters

      • C extends ComponentType<any>

      Parameters

      Returns void

      If the target layer has not been opened first.

      // after openLayer('edit-panel', 10)
      applyElement('edit-panel', {
      elementId: 'edit-panel-element',
      element: EditPanel,
      props: { value, onClose: () => closeLayer('edit-panel') },
      });