mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 00:18:12 +00:00
tippy: Use namespace import for tippy.js.
Names like “delegate”, “Instance”, “Placement”, “Props”, and “ReferenceElement” are much too generic to make sense as named imports. The downside is that we now need to write tippy.default(…) instead of tippy(…) (because ES module namespace objects cannot be callable), but that cost is worthwhile. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
87d36d24c9
commit
9b711cda20
@@ -2,7 +2,7 @@ import {subDays} from "date-fns";
|
||||
import $ from "jquery";
|
||||
import _ from "lodash";
|
||||
import assert from "minimalistic-assert";
|
||||
import tippy from "tippy.js";
|
||||
import * as tippy from "tippy.js";
|
||||
import {z} from "zod";
|
||||
|
||||
import render_confirm_delete_all_drafts from "../templates/confirm_dialog/confirm_delete_all_drafts.hbs";
|
||||
@@ -364,7 +364,7 @@ export function restore_message(draft: LocalStorageDraft): ComposeArguments {
|
||||
|
||||
function draft_notify(): void {
|
||||
// Display a tooltip to notify the user about the saved draft.
|
||||
const instance = tippy(".top_left_drafts .unread_count", {
|
||||
const instance = tippy.default(".top_left_drafts .unread_count", {
|
||||
content: $t({defaultMessage: "Saved as draft"}),
|
||||
arrow: true,
|
||||
placement: "right",
|
||||
|
||||
Reference in New Issue
Block a user