-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Playground] EuiAspectRatio * children node made visible
- Loading branch information
1 parent
53591a6
commit 34e187f
Showing
2 changed files
with
45 additions
and
0 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,43 @@ | ||
import { PropTypes } from 'react-view'; | ||
import { EuiAspectRatio } from '../../../../src/components/'; | ||
import { propUtilityForPlayground } from '../../services/playground'; | ||
|
||
export default () => { | ||
const docgenInfo = Array.isArray(EuiAspectRatio.__docgenInfo) | ||
? EuiAspectRatio.__docgenInfo[0] | ||
: EuiAspectRatio.__docgenInfo; | ||
const propsToUse = propUtilityForPlayground(docgenInfo.props); | ||
|
||
propsToUse.height.value = 9; | ||
propsToUse.width.value = 16; | ||
|
||
propsToUse.children = { | ||
value: `<iframe | ||
title="Elastic is a search company" | ||
width="560" | ||
height="315" | ||
src="https://www.youtube.com/embed/yJarWSLRM24" | ||
frameBorder="0" | ||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" | ||
allowFullScreen | ||
/>`, | ||
type: PropTypes.ReactNode, | ||
description: 'Visible label.', | ||
hidden: false, | ||
}; | ||
|
||
return { | ||
config: { | ||
componentName: 'EuiAspectRatio', | ||
props: propsToUse, | ||
scope: { | ||
EuiAspectRatio, | ||
}, | ||
imports: { | ||
'@elastic/eui': { | ||
named: ['EuiAspectRatio'], | ||
}, | ||
}, | ||
}, | ||
}; | ||
}; |