import { Story } from '@storybook/react' ; import React , { ComponentProps , ComponentType } from 'react' ; import { MockApmPluginContextWrapper } from '../../context/apm_plugin/mock_apm_plugin_context' ; import { BackendLink } from './backend_link' ; type Args = ComponentProps < typeof BackendLink > ; export default { title : 'shared/BackendLink' , component : BackendLink , decorators : [ ( StoryComponent ) => { return ( < MockApmPluginContextWrapper > < StoryComponent /> < /MockApmPluginContextWrapper>); } , ] , } ; export const Example = ( args ) => { return < BackendLink { ... args } / > ; } ; Example . args = { query : { backendName : 'postgres' , environment : 'ENVIRONMENT_ALL' , kuery : '' , rangeFrom : 'now-15m' , rangeTo : 'now' , } , } ;