Skip to content

Commit

Permalink
docs(popover-manager, tooltip-manager): Document the default slot. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
driskull authored Apr 27, 2021
1 parent c338419 commit 5974e73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { Component, Element, Host, h, Listen, Prop, VNode } from "@stencil/core"
import { POPOVER_REFERENCE } from "../calcite-popover/resources";
import { getElementById, getRootNode } from "../../utils/dom";

/**
* @slot - A slot for adding elements that reference a 'calcite-popover' by the 'selector' property.
*/
@Component({
tag: "calcite-popover-manager"
})
Expand Down Expand Up @@ -37,7 +40,11 @@ export class CalcitePopoverManager {
// --------------------------------------------------------------------------

render(): VNode {
return <Host />;
return (
<Host>
<slot />
</Host>
);
}

//--------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { TOOLTIP_REFERENCE, TOOLTIP_DELAY_MS } from "../calcite-tooltip/resource
import { getElementById, getRootNode } from "../../utils/dom";
import { getKey } from "../../utils/key";

/**
* @slot - A slot for adding elements that reference a 'calcite-tooltip' by the 'selector' property.
*/
@Component({
tag: "calcite-tooltip-manager"
})
Expand Down Expand Up @@ -163,7 +166,11 @@ export class CalciteTooltipManager {
// --------------------------------------------------------------------------

render(): VNode {
return <Host />;
return (
<Host>
<slot />
</Host>
);
}

//--------------------------------------------------------------------------
Expand Down

0 comments on commit 5974e73

Please # to comment.