react-tippy icon indicating copy to clipboard operation
react-tippy copied to clipboard

Distance property doesn't work

Open kpoddubnyi opened this issue 6 years ago • 2 comments

Hey,

Thank you for this library. Great work! I'm trying to configure tippy in my storybook right now and it seems that distance property doesn't make any changes.

Here is the code which I use:

import * as React from 'react';
import { Tooltip as Tippy } from 'react-tippy';

export class Tooltip extends React.Component {
  public render() {
    const { children } = this.props;

    return (
      <Tippy
        position="top"
        distance="50"
      >
        {children}
      </Tippy>
    );
  }
}

Am I doing something wrong?

UPD: distance={10} also doesn't seem to work

kpoddubnyi avatar Oct 05 '18 16:10 kpoddubnyi

I think this is a bug. You can add following css rule to apply distance to each side as a workaround for now.

.tippy-tooltip {
    margin: 50px;
}

KubaJastrz avatar Oct 15 '18 10:10 KubaJastrz

@tvkhoa I reproduced this bug too. I'll appreciate if u could take time to solve it

johnsoncheg avatar Jul 13 '20 09:07 johnsoncheg