Answers for "react tooltip on disabled button"

0

react tooltip on disabled button

/* Wrap the button in a span or div and conditionally set pointer-events to none */
<Tooltip title="You don't have permission to do this">
  <span>
    <button disabled={disabled} style={disabled ? { pointerEvents: "none" } : {}}>
      {'A disabled button'}
    </button>
  </span>
</Tooltip>
Posted by: Guest on September-11-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language