How to use @zendeskgarden/react-tooltips - 10 common examples

To help you get started, we’ve selected a few @zendeskgarden/react-tooltips 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 zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
describe('Arrow placement', () => {
    const arrowClasses = {
      [POPPER_PLACEMENTS.LEFT]: 'c-arrow--r',
      [POPPER_PLACEMENTS.LEFT_START]: 'c-arrow--rt',
      [POPPER_PLACEMENTS.LEFT_END]: 'c-arrow--rb',
      [POPPER_PLACEMENTS.TOP]: 'c-arrow--b',
      [POPPER_PLACEMENTS.TOP_START]: 'c-arrow--bl',
      [POPPER_PLACEMENTS.TOP_END]: 'c-arrow--br',
      [POPPER_PLACEMENTS.RIGHT]: 'c-arrow--l',
      [POPPER_PLACEMENTS.RIGHT_START]: 'c-arrow--lt',
      [POPPER_PLACEMENTS.RIGHT_END]: 'c-arrow--lb',
      [POPPER_PLACEMENTS.BOTTOM]: 'c-arrow--t',
      [POPPER_PLACEMENTS.BOTTOM_START]: 'c-arrow--tl',
      [POPPER_PLACEMENTS.BOTTOM_END]: 'c-arrow--tr'
    };

    it('renders correct arrow placement if provided', () => {
      Object.keys(arrowClasses).forEach(placement => {
        const { container } = render();

        expect(container.firstChild.firstChild).toHaveClass(arrowClasses[placement]);
      });
    });
  });
github zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
it('renders down styling if placement is provided', () => {
      [
        POPPER_PLACEMENTS.BOTTOM,
        POPPER_PLACEMENTS.BOTTOM_START,
        POPPER_PLACEMENTS.BOTTOM_END
      ].forEach(placement => {
        const { container } = render();

        expect(container.firstChild.firstChild).toHaveClass('c-menu--down');
      });
    });
github zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
describe('Arrow placement', () => {
    const arrowClasses = {
      [POPPER_PLACEMENTS.LEFT]: 'c-arrow--r',
      [POPPER_PLACEMENTS.LEFT_START]: 'c-arrow--rt',
      [POPPER_PLACEMENTS.LEFT_END]: 'c-arrow--rb',
      [POPPER_PLACEMENTS.TOP]: 'c-arrow--b',
      [POPPER_PLACEMENTS.TOP_START]: 'c-arrow--bl',
      [POPPER_PLACEMENTS.TOP_END]: 'c-arrow--br',
      [POPPER_PLACEMENTS.RIGHT]: 'c-arrow--l',
      [POPPER_PLACEMENTS.RIGHT_START]: 'c-arrow--lt',
      [POPPER_PLACEMENTS.RIGHT_END]: 'c-arrow--lb',
      [POPPER_PLACEMENTS.BOTTOM]: 'c-arrow--t',
      [POPPER_PLACEMENTS.BOTTOM_START]: 'c-arrow--tl',
      [POPPER_PLACEMENTS.BOTTOM_END]: 'c-arrow--tr'
    };

    it('renders correct arrow placement if provided', () => {
      Object.keys(arrowClasses).forEach(placement => {
        const { container } = render();

        expect(container.firstChild.firstChild).toHaveClass(arrowClasses[placement]);
      });
    });
  });
github zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
it('renders left styling if placement is provided', () => {
      [POPPER_PLACEMENTS.LEFT, POPPER_PLACEMENTS.LEFT_START, POPPER_PLACEMENTS.LEFT_END].forEach(
        placement => {
          const { container } = render();

          expect(container.firstChild.firstChild).toHaveClass('c-menu--left');
        }
      );
    });
github zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
describe('Arrow placement', () => {
    const arrowClasses = {
      [POPPER_PLACEMENTS.LEFT]: 'c-arrow--r',
      [POPPER_PLACEMENTS.LEFT_START]: 'c-arrow--rt',
      [POPPER_PLACEMENTS.LEFT_END]: 'c-arrow--rb',
      [POPPER_PLACEMENTS.TOP]: 'c-arrow--b',
      [POPPER_PLACEMENTS.TOP_START]: 'c-arrow--bl',
      [POPPER_PLACEMENTS.TOP_END]: 'c-arrow--br',
      [POPPER_PLACEMENTS.RIGHT]: 'c-arrow--l',
      [POPPER_PLACEMENTS.RIGHT_START]: 'c-arrow--lt',
      [POPPER_PLACEMENTS.RIGHT_END]: 'c-arrow--lb',
      [POPPER_PLACEMENTS.BOTTOM]: 'c-arrow--t',
      [POPPER_PLACEMENTS.BOTTOM_START]: 'c-arrow--tl',
      [POPPER_PLACEMENTS.BOTTOM_END]: 'c-arrow--tr'
    };

    it('renders correct arrow placement if provided', () => {
      Object.keys(arrowClasses).forEach(placement => {
        const { container } = render();

        expect(container.firstChild.firstChild).toHaveClass(arrowClasses[placement]);
github zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
describe('Arrow placement', () => {
    const arrowClasses = {
      [POPPER_PLACEMENTS.LEFT]: 'c-arrow--r',
      [POPPER_PLACEMENTS.LEFT_START]: 'c-arrow--rt',
      [POPPER_PLACEMENTS.LEFT_END]: 'c-arrow--rb',
      [POPPER_PLACEMENTS.TOP]: 'c-arrow--b',
      [POPPER_PLACEMENTS.TOP_START]: 'c-arrow--bl',
      [POPPER_PLACEMENTS.TOP_END]: 'c-arrow--br',
      [POPPER_PLACEMENTS.RIGHT]: 'c-arrow--l',
      [POPPER_PLACEMENTS.RIGHT_START]: 'c-arrow--lt',
      [POPPER_PLACEMENTS.RIGHT_END]: 'c-arrow--lb',
      [POPPER_PLACEMENTS.BOTTOM]: 'c-arrow--t',
      [POPPER_PLACEMENTS.BOTTOM_START]: 'c-arrow--tl',
      [POPPER_PLACEMENTS.BOTTOM_END]: 'c-arrow--tr'
    };

    it('renders correct arrow placement if provided', () => {
      Object.keys(arrowClasses).forEach(placement => {
        const { container } = render();
github zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
describe('Arrow placement', () => {
    const arrowClasses = {
      [POPPER_PLACEMENTS.LEFT]: 'c-arrow--r',
      [POPPER_PLACEMENTS.LEFT_START]: 'c-arrow--rt',
      [POPPER_PLACEMENTS.LEFT_END]: 'c-arrow--rb',
      [POPPER_PLACEMENTS.TOP]: 'c-arrow--b',
      [POPPER_PLACEMENTS.TOP_START]: 'c-arrow--bl',
      [POPPER_PLACEMENTS.TOP_END]: 'c-arrow--br',
      [POPPER_PLACEMENTS.RIGHT]: 'c-arrow--l',
      [POPPER_PLACEMENTS.RIGHT_START]: 'c-arrow--lt',
      [POPPER_PLACEMENTS.RIGHT_END]: 'c-arrow--lb',
      [POPPER_PLACEMENTS.BOTTOM]: 'c-arrow--t',
      [POPPER_PLACEMENTS.BOTTOM_START]: 'c-arrow--tl',
      [POPPER_PLACEMENTS.BOTTOM_END]: 'c-arrow--tr'
    };

    it('renders correct arrow placement if provided', () => {
      Object.keys(arrowClasses).forEach(placement => {
        const { container } = render();

        expect(container.firstChild.firstChild).toHaveClass(arrowClasses[placement]);
      });
    });
  });
github zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
describe('Arrow placement', () => {
    const arrowClasses = {
      [POPPER_PLACEMENTS.LEFT]: 'c-arrow--r',
      [POPPER_PLACEMENTS.LEFT_START]: 'c-arrow--rt',
      [POPPER_PLACEMENTS.LEFT_END]: 'c-arrow--rb',
      [POPPER_PLACEMENTS.TOP]: 'c-arrow--b',
      [POPPER_PLACEMENTS.TOP_START]: 'c-arrow--bl',
      [POPPER_PLACEMENTS.TOP_END]: 'c-arrow--br',
      [POPPER_PLACEMENTS.RIGHT]: 'c-arrow--l',
      [POPPER_PLACEMENTS.RIGHT_START]: 'c-arrow--lt',
      [POPPER_PLACEMENTS.RIGHT_END]: 'c-arrow--lb',
      [POPPER_PLACEMENTS.BOTTOM]: 'c-arrow--t',
      [POPPER_PLACEMENTS.BOTTOM_START]: 'c-arrow--tl',
      [POPPER_PLACEMENTS.BOTTOM_END]: 'c-arrow--tr'
    };

    it('renders correct arrow placement if provided', () => {
      Object.keys(arrowClasses).forEach(placement => {
        const { container } = render();

        expect(container.firstChild.firstChild).toHaveClass(arrowClasses[placement]);
      });
    });
  });
github zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
describe('Arrow placement', () => {
    const arrowClasses = {
      [POPPER_PLACEMENTS.LEFT]: 'c-arrow--r',
      [POPPER_PLACEMENTS.LEFT_START]: 'c-arrow--rt',
      [POPPER_PLACEMENTS.LEFT_END]: 'c-arrow--rb',
      [POPPER_PLACEMENTS.TOP]: 'c-arrow--b',
      [POPPER_PLACEMENTS.TOP_START]: 'c-arrow--bl',
      [POPPER_PLACEMENTS.TOP_END]: 'c-arrow--br',
      [POPPER_PLACEMENTS.RIGHT]: 'c-arrow--l',
      [POPPER_PLACEMENTS.RIGHT_START]: 'c-arrow--lt',
      [POPPER_PLACEMENTS.RIGHT_END]: 'c-arrow--lb',
      [POPPER_PLACEMENTS.BOTTOM]: 'c-arrow--t',
      [POPPER_PLACEMENTS.BOTTOM_START]: 'c-arrow--tl',
      [POPPER_PLACEMENTS.BOTTOM_END]: 'c-arrow--tr'
    };

    it('renders correct arrow placement if provided', () => {
      Object.keys(arrowClasses).forEach(placement => {
        const { container } = render();

        expect(container.firstChild.firstChild).toHaveClass(arrowClasses[placement]);
      });
    });
  });
github zendeskgarden / react-components / packages / menus / src / views / MenuView.spec.js View on Github external
it('renders up styling if placement is provided', () => {
      [POPPER_PLACEMENTS.TOP, POPPER_PLACEMENTS.TOP_START, POPPER_PLACEMENTS.TOP_END].forEach(
        placement => {
          const { container } = render();

          expect(container.firstChild.firstChild).toHaveClass('c-menu--up');
        }
      );
    });