fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Custom Bread Crumb Items

Open saritwik opened this issue 9 years ago • 2 comments

Hi,

I am using the Office Fabric bread crumb control and want to customize how each item is rendered in the bread crumb. In my case I want to add icons to the bread crumb items - instead of showing just plain text.

Looking for render function that I can use to control what bread crumb items look like.

Thanks

saritwik avatar Feb 07 '17 18:02 saritwik

Also I would be happy to contribute this feature myself to the library, if this is not planned.

saritwik avatar Feb 07 '17 19:02 saritwik

I think it would be worthwhile to make a PR adding the optional onRenderItem. Please take a look at IRenderFunction type usage in other places; I'd like to standardize with onRenderX overrides to use this. Basically there are multiple ways to inject custom content, if all components do it the same way, it adds predictability. The IRenderFunction signature takes in 2 props: the props for the item, and the default render function. Passing the first value in is obviously necessary, the second is super useful when you simply want to wrap the default rendered content inside of something else.

dzearing avatar Feb 07 '17 22:02 dzearing