Vardhaman Deshpande 087c35671b Updated react-organisationchart for SPFx 1.0 (#156)
* removed unused imports, changed image urls

* updated to drop 5

* updated webpart for SPFx 1.0

* added images and readme
2017-03-13 12:33:59 +02:00

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 'organisationChartStrings';
import OrganisationChart from './components/OrganisationChart';
import { IOrganisationChartProps } from './components/IOrganisationChartProps';
import { IOrganisationChartWebPartProps } from './IOrganisationChartWebPartProps';
export default class OrganisationChartWebPart extends BaseClientSideWebPart<IOrganisationChartWebPartProps> {
public render(): void {
const element: React.ReactElement<IOrganisationChartProps> = React.createElement(
OrganisationChart, {
serviceScope: this.context.serviceScope,
organisationName: this.properties.organisationName
});
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('organisationName', {
label: strings.OrganisationNameFieldLabel
})
]
}
]
}
]
};
}
}