import React , { ComponentProps } from 'react' ; import { CoreStart } from 'kibana/public' ; import { createCallApmApi } from '../../../../../services/rest/createCallApmApi' ; import { LinkPreview } from './link_preview' ; export default { title : 'app/Settings/CustomizeUI/CustomLink/CreateEditCustomLinkFlyout/LinkPreview' , component : LinkPreview , } ; export function Example ( { filters , label , url , } ) { const coreMock = { http : { get : async ( ) => ( { transaction : { id : '0' } } ) , } , uiSettings : { get : ( ) => false } , } as unknown as CoreStart ; createCallApmApi ( coreMock ) ; return < LinkPreview filters = { filters } label = { label } url = { url } / > ; } Example . args = { filters : [ ] , label : 'Example label' , url : 'https://example.com' , } as ComponentProps < typeof LinkPreview > ;