package.src.vaadin-message-input.js Maven / Gradle / Ivy
The newest version!
/**
* @license
* Copyright (c) 2021 - 2024 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import '@vaadin/button/src/vaadin-button.js';
import '@vaadin/text-area/src/vaadin-text-area.js';
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import { MessageInputMixin } from './vaadin-message-input-mixin.js';
/**
* `` is a Web Component for sending messages.
* It consists of a text area that grows on along with the content, and a send button to send message.
*
* The message can be sent by one of the following actions:
* - by pressing Enter (use Shift + Enter to add a new line)
* - by clicking `submit` button.
*
* ```html
*
* ```
*
* @customElement
* @extends HTMLElement
* @mixes MessageInputMixin
* @mixes ThemableMixin
* @mixes ElementMixin
*/
class MessageInput extends MessageInputMixin(ElementMixin(ThemableMixin(PolymerElement))) {
static get template() {
return html`
`;
}
static get is() {
return 'vaadin-message-input';
}
}
defineCustomElement(MessageInput);
export { MessageInput };
© 2015 - 2024 Weber Informatics LLC | Privacy Policy