Skip to content

Commit 66ad975

Browse files
authored
docs: document the purpose of HasTooltip interface better (#4604)
1 parent ab7b35b commit 66ad975

File tree

1 file changed

+13
-1
lines changed
  • vaadin-flow-components-shared-parent/vaadin-flow-components-base/src/main/java/com/vaadin/flow/component/shared

1 file changed

+13
-1
lines changed

vaadin-flow-components-shared-parent/vaadin-flow-components-base/src/main/java/com/vaadin/flow/component/shared/HasTooltip.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,22 @@
1515
*/
1616
package com.vaadin.flow.component.shared;
1717

18+
import com.vaadin.flow.component.Component;
1819
import com.vaadin.flow.component.HasElement;
1920

2021
/**
21-
* Mixin interface for components that support a tooltip.
22+
* Mixin interface for components that have special handling for tooltips on the
23+
* Web Component level.
24+
* <p>
25+
* Components that implement this interface get a
26+
* <code>&lt;vaadin-tooltip slot="tooltip"&gt;</code> element added inside the
27+
* component's light DOM and are expected to handle it appropriately on the
28+
* client-side.
29+
* <p>
30+
* Use this interface only if you are implementing a new component that also has
31+
* a Web Component counterpart with a custom tooltip support. Otherwise, use
32+
* {@link Tooltip#forComponent(Component)} instead.
33+
*
2234
*
2335
* @author Vaadin Ltd
2436
*/

0 commit comments

Comments
 (0)