chore(lab): Refactoring workbench menu
This commit is contained in:
parent
9e2babfc7b
commit
4634ced281
15 changed files with 270 additions and 455 deletions
|
@ -3,20 +3,13 @@ import { linkClasses, Chevron } from 'shared/components/navigation/primary.js'
|
|||
import Reset from './reset.js'
|
||||
import Disable from './disable.js'
|
||||
import List from './list.js'
|
||||
import { Ul, Details, TopSummary } from 'shared/components/workbench/menu'
|
||||
|
||||
const Xray = props => {
|
||||
|
||||
return (
|
||||
<details className='py-1' open>
|
||||
<summary className={`
|
||||
flex flex-row gap-4 text-lg
|
||||
hover:cursor-row-resize
|
||||
p-2
|
||||
text-base-content
|
||||
sm:text-neutral-content
|
||||
items-center
|
||||
`}>
|
||||
<span className="text-secondary-focus mr-4"><XrayIcon /></span>
|
||||
<Details open>
|
||||
<TopSummary icon={<XrayIcon />}>
|
||||
{props.gist?.xray?.enabled
|
||||
? (
|
||||
<>
|
||||
|
@ -39,18 +32,18 @@ const Xray = props => {
|
|||
</>
|
||||
)
|
||||
}
|
||||
</summary>
|
||||
</TopSummary>
|
||||
{props.gist?.xray?.enabled && (
|
||||
<ul className="pl-5 list-inside">
|
||||
<Ul>
|
||||
<Disable {...props} />
|
||||
<Reset {...props} />
|
||||
{
|
||||
props.gist?.xray?.parts &&
|
||||
Object.keys(props.gist.xray.parts).map(partName => <List {...props} partName={partName} />)
|
||||
}
|
||||
</ul>
|
||||
</Ul>
|
||||
)}
|
||||
</details>
|
||||
</Details>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue