import * as React from 'react' ; import omit from 'lodash/omit' ; import PropertyFieldHeader from '../../common/propertyFieldHeader/PropertyFieldHeader' ; import { IPropertyFieldChoiceGroupWithCalloutHostProps } from './IPropertyFieldChoiceGroupWithCalloutHost' ; import * as telemetry from '../../common/telemetry' ; import { ChoiceGroup , IChoiceGroupProps } from 'office-ui-fabric-react/lib/components/ChoiceGroup' ; export default class PropertyFieldToggleWithCalloutHost extends React . Component < IPropertyFieldChoiceGroupWithCalloutHostProps , null > { constructor ( props ) { super ( props ) ; telemetry . track ( 'PropertyFieldToggleWithCallout' , { disabled : props . disabled } ) ; } public render ( ) { const choiceGroupProps = omit ( this . props , [ 'label' ] ) ; choiceGroupProps . options . forEach ( option => { if ( option . iconProps ) { const iconPropsAny = option . iconProps as any ; option . iconProps . iconName = iconPropsAny . officeFabricIconFontName ; } } ) ; return ( < div > < PropertyFieldHeader { ... this . props } / > < ChoiceGroup { ... omit ( this . props , [ 'label' ] ) } / > < /div>); } }