How to use react-tooltip - 10 common examples

To help you get started, we’ve selected a few react-tooltip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vmware-tanzu / octant / web / react / src / components / App / index.tsx View on Github external
componentDidUpdate({ location: previousLocation }, { namespaceOption: previousNamespace }) {
    const { location } = this.props
    const { namespaceOption } = this.state

    const namespace = namespaceOption.value
    const prevNamespace = previousNamespace.value

    if (location.pathname !== previousLocation.pathname || namespace !== prevNamespace) {
      this.setEventSourceStream(location.pathname, namespace)
    }

    // this is required to make tool tips show.
    ReactTooltip.rebuild()
  }
github 0xProject / 0x-monorepo / packages / website / ts / components / inputs / allowance_state_toggle.tsx View on Github external
private async _onToggleAllowanceAsync(): Promise {
        // Close all tooltips
        ReactTooltip.hide();
        if (this.props.userAddress === '') {
            this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
            return;
        }

        let newAllowanceAmountInBaseUnits = new BigNumber(0);
        if (!this._isAllowanceSet()) {
            newAllowanceAmountInBaseUnits = DEFAULT_ALLOWANCE_AMOUNT_IN_BASE_UNITS;
        }
        const isUnlockingToken = newAllowanceAmountInBaseUnits.gt(0);
        this.setState({
            allowanceState: AllowanceState.Loading,
            loadingMessage: `${isUnlockingToken ? 'Unlocking' : 'Locking'} ${this.props.token.symbol}`,
        });
        const logData = {
            tokenSymbol: this.props.token.symbol,
github kleros / doges-on-trial / src / bootstrap / configure-store.js View on Github external
middleware.push(store => next => action => {
    const prevState = store.getState()
    const result = next(action)
    if (prevState !== store.getState()) ReactTooltip.rebuild()
    return result
  })
github onejgordon / flow-dashboard / src / js / components / analysis / AnalysisJournals.js View on Github external
componentDidUpdate(prevProps, prevState) {
        let {form} = this.state
        let annual_key_change = form.annual_viewer_key != prevState.form.annual_viewer_key
        if (annual_key_change) ReactTooltip.rebuild()
    }
github onejgordon / flow-dashboard / src / js / components / common / ProgressLine.js View on Github external
componentDidMount() {
    if (this.props.tooltip) ReactTooltip.rebuild();
  }

react-tooltip

react tooltip component

MIT
Latest version published 4 months ago

Package Health Score

94 / 100
Full package analysis