-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SharedUX] Migrate PageTemplate > NoData Page (#128372)
* [SharedUX] Migrate PageTemplate > NoDataPage > ActionCards * [SharedUX] Migrate PageTemplate > NoDataPage > SolutionNav * Updating snapshot * [SharedUX] Migrate PageTemplate > NoDataPage * Removing actionCards * [SharedUX] Migrate PageTemplate > SolutionNavAvatar * Fix comment * Renaming component * Fix folder structure * Fix storybook * Style fix * Update so the component now uses the SolutionAvatar * Fix props * Remove unnecessary types files * Fix failing test * Updating failed test * Fix obsolete snapshot * Applying PR comments * Update failing snapshot * Update failing snapshot * Add logo as an argtype Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
a2b9070
commit 79069d8
Showing
18 changed files
with
250 additions
and
130 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
*/ | ||
|
||
export { NoDataCard, ElasticAgentCard } from './no_data_page'; | ||
export { NoDataPage } from './no_data_page'; |
53 changes: 53 additions & 0 deletions
53
...red-ux-components/src/page_template/no_data_page/__snapshots__/no_data_page.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
26 changes: 0 additions & 26 deletions
26
...mplate/no_data_page/no_data_card/__snapshots__/elastic_agent_card.component.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
7 changes: 2 additions & 5 deletions
7
...rc/page_template/no_data_page/no_data_card/__snapshots__/elastic_agent_card.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
63 changes: 5 additions & 58 deletions
63
...ents/src/page_template/no_data_page/no_data_card/__snapshots__/no_data_card.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
39 changes: 39 additions & 0 deletions
39
packages/kbn-shared-ux-components/src/page_template/no_data_page/no_data_page.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,39 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { servicesFactory } from '@kbn/shared-ux-storybook'; | ||
import { NoDataPageProps } from './types'; | ||
import { NoDataPage } from './no_data_page'; | ||
|
||
const services = servicesFactory({}); | ||
|
||
export default { | ||
title: 'Page Template/No Data Page/No Data Page', | ||
description: 'No Data Page of PageTemplate', | ||
}; | ||
const action = { | ||
elasticAgent: {}, | ||
}; | ||
type Params = Pick<NoDataPageProps, 'solution' | 'logo'>; | ||
|
||
export const PureComponent = (params: Params) => { | ||
return <NoDataPage docsLink={services.docLinks.dataViewsDocLink} action={action} {...params} />; | ||
}; | ||
|
||
PureComponent.argTypes = { | ||
solution: { | ||
control: 'text', | ||
defaultValue: 'Observability', | ||
}, | ||
logo: { | ||
control: { type: 'radio' }, | ||
options: ['logoElastic', 'logoKibana', 'logoCloud', undefined], | ||
defaultValue: undefined, | ||
}, | ||
}; |
Oops, something went wrong.