import { formatCode } from '@fluentui/docs-components' ; import * as React from 'react' ; param props const createCallbackLogFormatter = ( props = [ ] ) => ( name , e , data ) => { const pickedProps = props . reduce ( ( acc , propName ) => { acc [ propName ] = data [ propName ] ; return acc ; } , { } ) ; return [ `/*[${ new Date ( ) . toLocaleTimeString ( ) }]*/` , `${ name } (e: { "type": "${ e ? e . type : 'NA' }" }, data: ${ formatCode ( JSON . stringify ( pickedProps ) , 'json' ) })` , ] . join ( ' ' ) ; } ; export default createCallbackLogFormatter ;