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.

      When the target layer has not been opened, the action is ignored (with a development warning) and the previous state is kept.

      Type Parameters

      • C extends ComponentType<any>

      Parameters

      Returns void

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