Webpart with Nav controls from React UI Fabric

Copper Contributor

I am developing a webpart to provide links to the main areas of the site. I am using Nav controls from React UI fabric. Is there any example code that works? https://developer.microsoft.com/en-us/fabric#/controls/web/nav I need to develop a webpart that implements this.

 

I am getting the following error and I dont know how to resolve this:

 

error TS2345: Argument of type '{ description: any; }' is not assignable to parameter of type 'Attributes'.

 

export interface INewWebpart1WebPartProps {
description: string;
}

export default class NewWebpart1WebPart extends BaseClientSideWebPart<INewWebpart1WebPartProps> {

public render(): void {
const element: React.ReactElement<INewWebpart1Props > = React.createElement(
NewWebpart1,
{
description: this.properties.description
}
);

ReactDom.render(element, this.domElement);
}
0 Replies