microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.59k stars 2.75k forks source link

Adding icon support for Dialog title #8238

Closed YaokaiYang-assaultmaster closed 5 years ago

YaokaiYang-assaultmaster commented 5 years ago

Describe the feature that you would like added

For now the Dialog's title can only be string. Can we support adding Icon to a title?

What component or utility would this be added to

dialogContentProps.title of Dialog

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

Additional context/screenshots

Like this: image

dzearing commented 5 years ago

@aftab-hassan this is related to Dialog, not Icon.

dzearing commented 5 years ago

We are looking at converting to use a slots pattern, which we could then consider this for the title slot. Every slot in a composite component should take in jsx.

@JasonGore for heads up.

tedfordtf commented 5 years ago

It would be very beneficial for our team (Power platform) too. It provides contextual feedback and it also allows our users to feel a sense of accomplishment of fulfilling a task done in a dialog

ravikiranr26 commented 5 years ago

Seems like i too had a same requirement, to show the Icon in title.

dzearing commented 5 years ago

By just changing the type to also allow JSX, this should enable your scenario. PR up.

msft-github-bot commented 5 years ago

:tada:This issue was addressed in #8405, which has now been successfully released as office-ui-fabric-react@v6.159.0.:tada:

Handy links:

agg23 commented 5 years ago

I would say #8405 only partially addresses this scenario, as the parent element for the title is <p>. This prevents adding children such as <div>, which removes some of the usefulness.