Skip to content
Discussion options

You must be logged in to vote

You can override the default icon by passing it as a children to infoButton slot:

import {
  Sparkle16Regular,
  Sparkle16Filled,
  bundleIcon
} from "@fluentui/react-icons";

//...

const Sparkle16 = bundleIcon(Sparkle16Filled, Sparkle16Regular);

//...

return (
  <InfoLabel
    info="This is example information for an InfoLabel."
    infoButton={{ children: <Sparkle16 /> }}
  >
    Example label
  </InfoLabel>
);

Keep in mind that if you override the icon, it will be your responsibility to use the correct size of the icon. InfoLabel will NOT scale the icon based on the size prop.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 15MariamS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #29787 on November 07, 2023 23:32.