-
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.
[shared-ux] Create Services, migrate Exit Full Screen button
- Loading branch information
1 parent
83621d6
commit 4d6cd93
Showing
30 changed files
with
1,085 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* 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 { DecoratorFn } from '@storybook/react'; | ||
import { ServicesProvider } from '../public/services'; | ||
import { servicesFactory } from '../public/services/storybook'; | ||
|
||
/** | ||
* A Storybook decorator that provides the Shared UX `ServicesProvider` with Storybook-specific | ||
* implementations to stories. | ||
*/ | ||
export const servicesDecorator: DecoratorFn = (storyFn) => ( | ||
<ServicesProvider {...servicesFactory({})}>{storyFn()}</ServicesProvider> | ||
); |
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,12 @@ | ||
/* | ||
* 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 { addDecorator } from '@storybook/react'; | ||
import { servicesDecorator } from './decorators'; | ||
|
||
addDecorator(servicesDecorator); |
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,19 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
module.exports = { | ||
preset: '@kbn/test', | ||
rootDir: '../../..', | ||
roots: ['<rootDir>/src/plugins/shared_ux'], | ||
transform: { | ||
'^.+\\.stories\\.tsx?$': '@storybook/addon-storyshots/injectFileName', | ||
}, | ||
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/src/plugins/shared_ux', | ||
coverageReporters: ['text', 'html'], | ||
collectCoverageFrom: ['<rootDir>/src/plugins/shared_ux/{common,public,server}/**/*.{js,ts,tsx}'], | ||
}; |
249 changes: 249 additions & 0 deletions
249
...ic/components/exit_full_screen_button/__snapshots__/exit_full_screen_button.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.