@arcmantle/lit-jsx
    Preparing search index...
    • Creates a component that can be used directly in JSX syntax. Also registers the custom element if it hasn't been registered yet.

      Type Parameters

      • T extends { tagName: string; new (...args: any): any }

      Parameters

      • element: T

      Returns ToComponent<InstanceType<T>>

      import { toComponent } from 'jsx-lit';

      export class MyButton extends LitElement {
      static tagName = 'my-button';
      }

      const MyButtonComponent = toComponent(MyButton);

      // Usage in JSX - compiler automatically detects this as a custom element
      const jsx = (
      <MyButtonComponent
      class="my-button"
      on-click={() => { console.log('Clicked!'); }}
      />
      );