Calcite-components: Docs: Update the doc section for how to add a tooltip to `calcite-action-bar` expand action

Created on 7 Apr 2021  路  6Comments  路  Source: Esri/calcite-components

Description

with beta.52, this section of the doc no longer works:

<calcite-action-bar id="action-bar-test">
  <calcite-action text="Add" icon="plus"></calcite-action>
</calcite-action-bar>
<calcite-tooltip id="tooltip">Expand</calcite-tooltip>
<script>
  var actionBar = document.getElementById("action-bar-test");
  var tooltip = document.getElementById("tooltip");
  actionBar.tooltipExpand = tooltip;
</script>

It would be helpful to show the proper way to do this to help making the update to the new version, it was confusing to me.

Which Component

calcite-action-bar

cc: @driskull

4 - verified docs

Most helpful comment

@ethanbdev - I had to make this change as well, its a slot for the expand tooltip, from the .52 changes list

action-bar, action-pad: Replace 'tooltipExpand' properties with 'expand-tooltip' slots (#1841) (38787d4)

All 6 comments

@ethanbdev - I had to make this change as well, its a slot for the expand tooltip, from the .52 changes list

action-bar, action-pad: Replace 'tooltipExpand' properties with 'expand-tooltip' slots (#1841) (38787d4)

@ethanbdev - I had to make this change as well, its a slot for the expand tooltip, from the .52 changes list

action-bar, action-pad: Replace 'tooltipExpand' properties with 'expand-tooltip' slots (#1841) (38787d4)

Thanks @kevindoshier, so the tooltip needs to be appended to the action bar now instead of the document body?

I think this should work

<calcite-action-bar id="action-bar-test">
  <calcite-tooltip slot="expand-tooltip">Expand</calcite-tooltip>
  <calcite-action text="Add" icon="plus"></calcite-action>
</calcite-action-bar>

Yes, that' is correct.

I think this should work

<calcite-action-bar id="action-bar-test">
  <calcite-tooltip slot="expand-tooltip">Expand</calcite-tooltip>
  <calcite-action text="Add" icon="plus"></calcite-action>
</calcite-action-bar>

Thanks 馃槂

Thanks @driskull 馃憤

Was this page helpful?
0 / 5 - 0 ratings