-
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.
- Loading branch information
1 parent
cbbf981
commit 010b7b9
Showing
10 changed files
with
101 additions
and
3 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
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,10 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
// eslint-disable-next-line import/no-commonjs | ||
module.exports = require('@kbn/storybook').defaultConfig; |
9 changes: 9 additions & 0 deletions
9
src/plugins/expression_reveal_image/public/__stories__/index.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,9 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
export * from './render'; |
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
...mage/public/expression_renderers/__stories__/__snapshots__/reveal_image.stories.storyshot
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
...plugins/expression_reveal_image/public/expression_renderers/__stories__/reveal_image.scss
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,18 @@ | ||
.revealImage { | ||
height: 100%; | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
pointer-events: none; | ||
|
||
.revealImageAligner { | ||
background-size: contain; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
// disables selection and dragging | ||
.revealImage__image { | ||
user-select: none; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
...on_reveal_image/public/expression_renderers/__stories__/reveal_image_renderer.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,27 @@ | ||
/* | ||
* 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 { storiesOf } from '@storybook/react'; | ||
import { revealImageRenderer } from '../'; | ||
import { Render } from '../../__stories__'; | ||
import { elasticOutline } from '../../../common/lib/elastic_outline'; | ||
import { elasticLogo } from '../../../common/lib/elastic_logo'; | ||
import { Origin } from '../../expression_functions'; | ||
import './reveal_image.scss'; | ||
|
||
storiesOf('renderers/revealImage', module).add('default', () => { | ||
const config = { | ||
image: elasticLogo, | ||
emptyImage: elasticOutline, | ||
origin: Origin.LEFT, | ||
percent: 0.45, | ||
}; | ||
|
||
return <Render renderer={revealImageRenderer} config={config} />; | ||
}); |
2 changes: 1 addition & 1 deletion
2
...blic/expression_renderers_legacy/__stories__/__snapshots__/reveal_image.stories.storyshot
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
.../expression_reveal_image/public/expression_renderers_legacy/__stories__/reveal_image.scss
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,18 @@ | ||
.revealImage { | ||
height: 100%; | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
pointer-events: none; | ||
|
||
.revealImageAligner { | ||
background-size: contain; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
// disables selection and dragging | ||
.revealImage__image { | ||
user-select: none; | ||
} | ||
} |
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