@comparaonline/ui-tooltip

After you have installed the package, please follow the following simple steps

Usage no npm install needed!

<script type="module">
  import comparaonlineUiTooltip from 'https://cdn.skypack.dev/@comparaonline/ui-tooltip';
</script>

README

@comparaonline/ui-tooltip

How to use

After you have installed the package, please follow the following simple steps

import React, { Component } from 'react';
import Tooltip from '@comparaonline/ui-tooltip';
import ListItem from '@material-ui/core/ListItem';

class Filter extends Component {
  render() {
    const { filter } = this.props;
    return (
      <ListItem
        primary={
          <span>
            {filter.label}
            {filter.description && <Tooltip title={filter.description} />}
          </span>
        }
      />
    );
  }
}

as simple as that, using @comparaonline/ui-tooltip is so simple and it's based on @material-ui/core/Tooltip API, so the exact props can be found here

This component will merge 2 interfaces for two different compomnents @material-ui/core/Tooltip and @fortawesome/react-fontawesome

So here you have our props

Description Default Value Expected Type Value Required
Icon element to be render faInfoCircle Icon Element FontAwesome React.ReactNode false
All props that received @fortawesome/react-fontawesome {} object with @fortawesome/react-fontawesome props false