1.1.0-alpha.1 • Published 3 months ago

@polar/lib-tooltip v1.1.0-alpha.1

Weekly downloads
-
License
EUPL-1.2
Repository
github
Last release
3 months ago

tooltip

Minimal package that provides a div element factory bound to i18next translations. The element can e.g. be used in ol/Overlay.

import { getTooltip } from '@polar/lib-tooltip'

const tooltip = getTooltip({
  style: '', // optional inline style string
  localeKeys: [
    // tag/content pairs
    ['h2', 'plugins.myPlugin.header'],
    ['p', 'plugins.myPlugin.body']
  ],
})

// tooltip contains 'element' (a div) and 'unregister' (when div is no longer used)
// the element will automatically update on locale change
1.1.0-alpha.1

3 months ago

1.0.0

5 months ago