Palette will have a header if the user pass primaryText to the
constructor. If the user sets content, there will be a separator
between the header and the content.
API change: to set the content, use palette.setContent(content) .
Previously was done using getContainer(), which does not exist
anymore.
Palette will have a header if the user pass primaryText to the constructor. If the user sets content, there will be a separator between the header and the content.
API change: to set the content, use palette.setContent(content) . Previously was done using getContainer(), which does not exist anymore.
Also, improve the offset calculation using element.getBoundingClientRect https://developer.mozilla.org/en-US/docs/Web/API/element.getBoundingClientRect