import * as React from 'react' ; import PropertyFieldHeader from '../../common/propertyFieldHeader/PropertyFieldHeader' ; import { IPropertyFieldToggleWithCalloutHostProps } from './IPropertyFieldToggleWithCalloutHost' ; import * as telemetry from '../../common/telemetry' ; import { Toggle } from 'office-ui-fabric-react/lib/components/Toggle' ; import omit from 'lodash/omit' ; export default class PropertyFieldToggleWithCalloutHost extends React . Component < IPropertyFieldToggleWithCalloutHostProps , null > { constructor ( props ) { super ( props ) ; telemetry . track ( 'PropertyFieldToggleWithCallout' , { disabled : props . disabled } ) ; } public render ( ) { return ( < div > < PropertyFieldHeader { ... this . props } label = { this . props . label . toString ( ) } / > < Toggle { ... omit ( this . props , [ 'label' ] ) } / > < /div>); } }