fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Add badge support for IButtonProps

Open elleaura opened this issue 7 years ago • 5 comments

Describe the feature that you would like added Apologies if this has already been requested, but it would be awesome if there was badging support for icons/buttons.

What component or utility would this be added to I assume this would be under IButtonProps?

Have you discussed this feature with our team, and if so, who No

Additional context/screenshots I was imagining it would be something like Material UI's badging API

I guess if there's no API for it, is it possible to add a badge to button?

elleaura avatar May 03 '19 15:05 elleaura

Interesting request! To save a few clicks, here's the desired output:

image

KevinTCoughlin avatar May 03 '19 16:05 KevinTCoughlin

@KevinTCoughlin do you think there's a way to get the desired output with the current API? I'm trying to think of features in Office that might use this, but I'm having a hard time thinking of any. If there's no use for it in Office I understand why you might close this, but was wondering what your opinion was.

elleaura avatar May 03 '19 18:05 elleaura

@lalicari You can always use onRender* methods on Button component to get desired output without compromising on functionality that the component brings. A quick & dirty codepen: https://codepen.io/atneik/pen/rgBmOe

atneik avatar May 03 '19 18:05 atneik

Sweet! I thought it'd have to be more hacky than that, but that's way simpler than I imagined. Thanks! If it's that simple, feel free to ignore this request, unless you feel like exposing this functionality more would be useful.

elleaura avatar May 03 '19 19:05 elleaura

Glad that will work for you. I'll close this request for now and lets keep an eye if more developers / design need something like this.

atneik avatar May 03 '19 20:05 atneik