All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.media-query-controller.d.ts Maven / Gradle / Ivy

There is a newer version: 24.5.3
Show newest version
/**
 * @license
 * Copyright (c) 2021 - 2023 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
import type { ReactiveController } from 'lit';

/**
 * A controller for listening on media query changes.
 */
export class MediaQueryController implements ReactiveController {
  /**
   * The CSS media query to evaluate.
   */
  protected query: string;

  /**
   * Function to call when media query changes.
   */
  protected callback: (matches: boolean) => void;

  /**
   * @param {HTMLElement} host
   */
  constructor(query: string, callback: (matches: boolean) => void);

  hostConnected(): void;

  hostDisconnected(): void;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy