MCPcopy Create free account
hub / github.com/TanStack/devtools / Expander

Function Expander

packages/devtools-ui/src/components/tree.tsx:410–444  ·  view source on GitHub ↗
(props: { expanded: boolean; onClick: () => void })

Source from the content-addressed store, hash-verified

408}
409
410const Expander = (props: { expanded: boolean; onClick: () => void }) => {
411 const styles = createStyles()
412 return (
413 <span
414 onClick={props.onClick}
415 class={clsx(
416 styles().tree.expander,
417 css`
418 transform: rotate(${props.expanded ? 90 : 0}deg);
419 `,
420 props.expanded &&
421 css`
422 & svg {
423 top: -1px;
424 }
425 `,
426 )}
427 >
428 <svg
429 width="16"
430 height="16"
431 viewBox="0 0 16 16"
432 fill="none"
433 xmlns="http://www.w3.org/2000/svg"
434 >
435 <path
436 d="M6 12L10 8L6 4"
437 stroke-width="2"
438 stroke-linecap="round"
439 stroke-linejoin="round"
440 />
441 </svg>
442 </span>
443 )
444}

Callers

nothing calls this directly

Calls 1

createStylesFunction · 0.90

Tested by

no test coverage detected