forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
157d7a4
commit 7a5ee52
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...s/apm/public/tutorial/tutorial_fleet_instructions/tutorial_fleet_instructions.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
/* eslint-disable react/function-component-definition */ | ||
|
||
import { Story } from '@storybook/react'; | ||
import React from 'react'; | ||
import { HttpStart } from 'kibana/public'; | ||
import TutorialFleetInstructions from '.'; | ||
|
||
interface Args { | ||
hasFleetPolicyWithApmIntegration: boolean; | ||
} | ||
|
||
function Wrapper({ hasFleetPolicyWithApmIntegration }: Args) { | ||
// TODO mock http | ||
const http = ({ | ||
get: () => ({ hasData: hasFleetPolicyWithApmIntegration }), | ||
} as unknown) as HttpStart; | ||
return ( | ||
<TutorialFleetInstructions | ||
http={http} | ||
basePath="http://localhost:5601" | ||
isDarkTheme={false} | ||
/> | ||
); | ||
} | ||
|
||
export default { | ||
title: 'app/Tutorial/FleetInstructions', | ||
component: TutorialFleetInstructions, | ||
argTypes: { | ||
hasFleetPolicyWithApmIntegration: { | ||
control: { type: 'inline-radio', options: [true, false] }, | ||
}, | ||
}, | ||
}; | ||
|
||
export const WithApmIntegration: Story<Args> = (_args) => { | ||
return <Wrapper {..._args} />; | ||
}; | ||
|
||
WithApmIntegration.args = { | ||
hasFleetPolicyWithApmIntegration: true, | ||
}; |