How to use the @zendeskgarden/react-tooltips.POPPER_PLACEMENTS.BOTTOM_START function in @zendeskgarden/react-tooltips

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]);
      });
    });
  });