fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Choice Group][Feature request] Tooltip on choice group containing images

Open aadhars opened this issue 9 years ago • 2 comments

We want to add tooltip to choice group option containing image. Right now the only possible way to achieve this is to write custom renderer for choice group option. But writing the custom render for just tooltip is too much overhead. Can we have first class support for tooltip on choice group option containing image.

aadhars avatar Jul 12 '17 10:07 aadhars

We always try to support the 99% usecase in each component and then open up edge cases via onRender methods. This keeps the code less complex and lighter as we don't have to bundle image and tooltip into every choice group.

Here is a TooltipHost with a custom image

<TooltipHost tooltipProps={{ onRenderContent: () => <Image src='image.jpg'/>}} >

A custom option would have this

onRenderLabel: (props, onRenderLabel) => {
  return(
    <TooltipHost tooltipProps={{ onRenderContent: () => <Image src='image.jpg'/>}} >
      { onRenderLabel } 
    </TooltipHost>
  );
}

micahgodbolt avatar Jul 12 '17 16:07 micahgodbolt

Got it @micahgodbolt . Closing the issue

aadhars avatar Aug 15 '17 06:08 aadhars