feat(lab): Console log options in xray
This commit is contained in:
parent
50b27e01a7
commit
1ccb1ae4b8
2 changed files with 35 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
import XrayIcon from 'shared/components/icons/xray.js'
|
||||
import { linkClasses, Chevron } from 'shared/components/navigation/primary.js'
|
||||
import Log from './log.js'
|
||||
import Reset from './reset.js'
|
||||
import Disable from './disable.js'
|
||||
import List from './list.js'
|
||||
|
@ -38,6 +39,7 @@ const Xray = props => {
|
|||
{props.gist?._state?.xray?.enabled && (
|
||||
<Ul>
|
||||
<Disable {...props} />
|
||||
<Log {...props} />
|
||||
<Reset {...props} />
|
||||
{
|
||||
props.gist?._state?.xray?.parts &&
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
import { Chevron } from 'shared/components/navigation/primary.js'
|
||||
import { Ul, Li, Details, Summary, SumButton, SumDiv, Deg } from 'shared/components/workbench/menu'
|
||||
|
||||
const ConsoleLog = props => (
|
||||
<Li>
|
||||
<Details>
|
||||
<Summary>
|
||||
<SumDiv>
|
||||
<Deg />
|
||||
<span>console.log()</span>
|
||||
</SumDiv>
|
||||
<Chevron />
|
||||
</Summary>
|
||||
<Ul>
|
||||
{['config', 'gist', 'draft'].map(it => (
|
||||
<Li key={it}>
|
||||
<SumButton onClick={() => console.log(it === 'config'
|
||||
? props.pattern.config
|
||||
: props[it]
|
||||
)}>
|
||||
<SumDiv>
|
||||
<Deg />
|
||||
<span>{it}</span>
|
||||
</SumDiv>
|
||||
</SumButton>
|
||||
</Li>
|
||||
))}
|
||||
</Ul>
|
||||
</Details>
|
||||
</Li>
|
||||
)
|
||||
|
||||
export default ConsoleLog
|
Loading…
Add table
Add a link
Reference in a new issue