MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / CollapsableObjectPreview

Function CollapsableObjectPreview

packages/frontend/src/inspector.tsx:602–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600const CollapsableObjectPreview: s.Component<{
601 value: NonNullable<decode.ObjectValueData['value']>
602}> = props => (
603 <ul class="w-full flex flex-col gap-.5">
604 <Entries of={props.value}>
605 {(key, _value) => {
606 const value = s.createMemo(_value)
607 return (
608 <s.Show
609 when={decode.isValueNested(value())}
610 children={_ => {
611 const [extended, setExtended] = s.createSignal(false)
612 return (
613 <ValueNode
614 name={key}
615 value={value()}
616 onClick={() => setExtended(p => !p)}
617 isExtended={extended()}
618 />
619 )
620 }}
621 fallback={<ValueNode name={key} value={value()} />}
622 />
623 )
624 }}
625 </Entries>
626 </ul>
627)
628
629const getObjectValueName = (type: debug.ValueType.Array | debug.ValueType.Object): string =>
630 type === debug.ValueType.Array ? 'Array' : 'Object'

Callers

nothing calls this directly

Calls 1

valueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…