-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Greg Thompson <[email protected]>
- Loading branch information
1 parent
734e0cb
commit 635ceb1
Showing
2 changed files
with
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { | ||
propUtilityForPlayground, | ||
dummyFunction, | ||
} from '../../services/playground'; | ||
import { EuiTab } from '../../../../src/components/'; | ||
import { PropTypes } from 'react-view'; | ||
|
||
export const tabConfig = () => { | ||
const docgenInfo = Array.isArray(EuiTab.__docgenInfo) | ||
? EuiTab.__docgenInfo[0] | ||
: EuiTab.__docgenInfo; | ||
const propsToUse = propUtilityForPlayground(docgenInfo.props); | ||
|
||
propsToUse.onClick = { | ||
...propsToUse.onClick, | ||
type: PropTypes.Custom, | ||
value: undefined, | ||
custom: { | ||
...propsToUse.onClick.custom, | ||
use: 'switch', | ||
label: 'Simulate', | ||
}, | ||
}; | ||
|
||
propsToUse.children = { | ||
...propsToUse.children, | ||
type: PropTypes.String, | ||
value: 'Tab content', | ||
}; | ||
|
||
return { | ||
config: { | ||
componentName: 'EuiTab', | ||
props: propsToUse, | ||
scope: { | ||
EuiTab, | ||
}, | ||
imports: { | ||
'@elastic/eui': { | ||
named: ['EuiTab'], | ||
}, | ||
}, | ||
customProps: { | ||
onClick: dummyFunction, | ||
}, | ||
}, | ||
}; | ||
}; |
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