How to use the react-md/lib/Tooltips function in react-md

To help you get started, we’ve selected a few react-md 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 Azure / ibex-dashboard / client / src / components / Tooltip / TooltipFontIcon.tsx View on Github external
import * as React from 'react';
import FontIcon from 'react-md/lib/FontIcons';
import injectTooltip from 'react-md/lib/Tooltips';

// Material icons shouldn't have any other children other than the child string and
// it gets converted into a span if the tooltip is added, so we add a container
// around the two.
const TooltipFontIcon = injectTooltip(({
  children, iconClassName, className, tooltip, forceIconFontSize, forceIconSize, style, iconStyle, ...props }) => (

  <div style="{style}">
    {tooltip}
    
      {children}
    
  </div>
));

TooltipFontIcon.propTypes = {
github mlaursen / react-md / docs / src / shared / components / ReactMD / tooltips / TooltipFontIcon.jsx View on Github external
import React, { PropTypes } from 'react';
import classnames from 'classnames';
import FontIcon from 'react-md/lib/FontIcons';
import injectTooltip from 'react-md/lib/Tooltips';

// Material icons shouldn't have any other children other than the child string and
// it gets converted into a span if the tooltip is added, so we add a container
// around the two.
const TooltipFontIcon = injectTooltip(({ children, iconClassName, className, tooltip, ...props }) =&gt; (
  <div>
    {tooltip}
    {children}
  </div>
));

TooltipFontIcon.propTypes = {
  children: PropTypes.string.isRequired,
  className: PropTypes.string,
  iconClassName: PropTypes.string,
  tooltip: PropTypes.node,
};

export default TooltipFontIcon;
github mlaursen / react-md / docs / src / examples / tooltips / TooltipFontIcon.jsx View on Github external
import React, { PropTypes } from 'react';
import classnames from 'classnames';
import FontIcon from 'react-md/lib/FontIcons';
import injectTooltip from 'react-md/lib/Tooltips';

// Material icons shouldn't have any other children other than the child string and
// it gets converted into a span if the tooltip is added, so we add a container
// around the two.
const TooltipFontIcon = injectTooltip(({ children, iconClassName, className, ...props }) =&gt; (
  <div>
    {children}
  </div>
));

TooltipFontIcon.propTypes = {
  children: PropTypes.string.isRequired,
  className: PropTypes.string,
  iconClassName: PropTypes.string,
};

export default TooltipFontIcon;
github mlaursen / react-md / documentation / src / components / Components / tooltips / CustomExamples.jsx View on Github external
const styles = {
  tooltipContainer: {
    position: 'relative',
    display: 'inline-block',
    margin: '1em',
  },
};

const TooltipFontIcon = injectTooltip(({ children, iconClassName, tooltip }) =&gt; (
  <div style="{styles.tooltipContainer}">
    {tooltip}
    {children}
  </div>
));

const TooltipLink = injectTooltip(({ children, tooltip }) =&gt; (
  <a style="{styles.tooltipContainer}">
    {tooltip}
    {children}
  </a>
));

const CustomExamples = () =&gt; (
  <section>
    <p>Any component can be composed with the tooltip. Here is are some with the FontIcons.</p>
    print
    print
    print
    print
    <p>
      Tooltips will not appear on a composed component if the tooltipLabel is not specified.
      Here are some examples of a link.</p></section>
github mlaursen / react-md / docs / src / examples / tooltips / TooltipLink.jsx View on Github external
import React, { PropTypes } from 'react';
import classnames from 'classnames';

import injectTooltip from 'react-md/lib/Tooltips';

const TooltipLink = injectTooltip(({ children, className, ...props }) =&gt; (
  <a>
    {children}
  </a>
));

TooltipLink.propTypes = {
  className: PropTypes.string,
  children: PropTypes.node,
  href: PropTypes.string.isRequired,
};

export default TooltipLink;
github mlaursen / react-md / documentation / src / components / Components / tooltips / CustomExamples.jsx View on Github external
import React from 'react';
import FontIcon from 'react-md/lib/FontIcons';
import injectTooltip from 'react-md/lib/Tooltips';

const styles = {
  tooltipContainer: {
    position: 'relative',
    display: 'inline-block',
    margin: '1em',
  },
};

const TooltipFontIcon = injectTooltip(({ children, iconClassName, tooltip }) =&gt; (
  <div style="{styles.tooltipContainer}">
    {tooltip}
    {children}
  </div>
));

const TooltipLink = injectTooltip(({ children, tooltip }) =&gt; (
  <a style="{styles.tooltipContainer}">
    {tooltip}
    {children}
  </a>
));

const CustomExamples = () =&gt; (
  <section>
    <p>Any component can be composed with the tooltip. Here is are some with the FontIcons.</p></section>
github Azure / ibex-dashboard / client / src / components / Tooltip / Tooltip.tsx View on Github external
import * as React from 'react';
import injectTooltip from 'react-md/lib/Tooltips';

const Tooltip = injectTooltip(
  ({children, className, tooltip, ...props }) =&gt; (
  <div style="{{position:">
    {tooltip}
    {children}
  </div>
));

Tooltip.propTypes = {
  children: React.PropTypes.node,
  className: React.PropTypes.string,
  tooltip: React.PropTypes.node,
};

export default Tooltip;
github mlaursen / react-md / docs / src / shared / components / ReactMD / tooltips / TooltipLink.jsx View on Github external
import React, { PropTypes } from 'react';
import classnames from 'classnames';

import injectTooltip from 'react-md/lib/Tooltips';

const TooltipLink = injectTooltip(({ children, className, tooltip, ...props }) =&gt; (
  <a>
    {tooltip}
    {children}
  </a>
));

TooltipLink.propTypes = {
  tooltip: PropTypes.node,
  className: PropTypes.string,
  children: PropTypes.node,
  href: PropTypes.string.isRequired,
};
github mlaursen / react-md / docs / src / components / Components / Tooltips / CustomExamples.jsx View on Github external
const styles = {
  tooltipContainer: {
    position: 'relative',
    display: 'inline-block',
    margin: '1em',
  },
};

const TooltipFontIcon = injectTooltip(({ children, iconClassName, tooltip }) =&gt; (
  <div style="{styles.tooltipContainer}">
    {tooltip}
    {children}
  </div>
));

const TooltipLink = injectTooltip(({ children, tooltip }) =&gt; (
  <a style="{styles.tooltipContainer}">
    {tooltip}
    {children}
  </a>
));

const CustomExamples = () =&gt; (
  <section>
    <p>Any component can be composed with the tooltip. Here is are some with the FontIcons.</p>
    print
    print
    print
    print
    <p>
      Tooltips will not appear on a composed component if the tooltipLabel is not specified.
      Here are some examples of a link.</p></section>
github mlaursen / react-md / docs / src / components / Components / Tooltips / CustomExamples.jsx View on Github external
import React from 'react';
import FontIcon from 'react-md/lib/FontIcons';
import injectTooltip from 'react-md/lib/Tooltips';

const styles = {
  tooltipContainer: {
    position: 'relative',
    display: 'inline-block',
    margin: '1em',
  },
};

const TooltipFontIcon = injectTooltip(({ children, iconClassName, tooltip }) =&gt; (
  <div style="{styles.tooltipContainer}">
    {tooltip}
    {children}
  </div>
));

const TooltipLink = injectTooltip(({ children, tooltip }) =&gt; (
  <a style="{styles.tooltipContainer}">
    {tooltip}
    {children}
  </a>
));

const CustomExamples = () =&gt; (
  <section>
    <p>Any component can be composed with the tooltip. Here is are some with the FontIcons.</p></section>