mirror of
https://github.com/pnp/sp-dev-fx-webparts.git
synced 2025-03-04 02:39:22 +00:00
* react-provision-assets sample added. provides advanced techniques for provisioning lists, libraries, fields and more. * README drop icon changed to GA I updated the drop icon from drop4 to GA so not to cause confusion when someone is looking at the README. * README file updated
54 lines
1.5 KiB
TypeScript
54 lines
1.5 KiB
TypeScript
import * as React from 'react';
|
|
import * as ReactDom from 'react-dom';
|
|
import { Version } from '@microsoft/sp-core-library';
|
|
import {
|
|
BaseClientSideWebPart,
|
|
IPropertyPaneConfiguration,
|
|
PropertyPaneTextField
|
|
} from '@microsoft/sp-webpart-base';
|
|
|
|
import * as strings from 'reactProvisionAssetsStrings';
|
|
import ReactProvisionAssets from './components/ReactProvisionAssets';
|
|
import { IReactProvisionAssetsProps } from './components/IReactProvisionAssetsProps';
|
|
import { IReactProvisionAssetsWebPartProps } from './IReactProvisionAssetsWebPartProps';
|
|
|
|
export default class ReactProvisionAssetsWebPart extends BaseClientSideWebPart<IReactProvisionAssetsWebPartProps> {
|
|
|
|
public render(): void {
|
|
const element: React.ReactElement<IReactProvisionAssetsProps > = React.createElement(
|
|
ReactProvisionAssets,
|
|
{
|
|
description: this.properties.description
|
|
}
|
|
);
|
|
|
|
ReactDom.render(element, this.domElement);
|
|
}
|
|
|
|
protected get dataVersion(): Version {
|
|
return Version.parse('1.0');
|
|
}
|
|
|
|
protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
|
|
return {
|
|
pages: [
|
|
{
|
|
header: {
|
|
description: strings.PropertyPaneDescription
|
|
},
|
|
groups: [
|
|
{
|
|
groupName: strings.BasicGroupName,
|
|
groupFields: [
|
|
PropertyPaneTextField('description', {
|
|
label: strings.DescriptionFieldLabel
|
|
})
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
};
|
|
}
|
|
}
|