Sha256: 4ec44b9fd4cf335ff5bd4f03d58d5a2758e15c7fb75269a7908ad0fc7baeb2b4

Contents?: true

Size: 821 Bytes

Versions: 58

Compression:

Stored size: 821 Bytes

Contents

import React from "react"

//CollapsibleTrail component
const CollapsibleTrail = ({ leftOffset }: { leftOffset: number }) => {
  const style: { [key: string]: string | number } = {
    left: `${leftOffset}em`,
  }

  return (
    <div 
        className="collapsible-trail" 
        style={style}
    />
  )
}

// Updated function to render multiple trails depending on depth
export const renderCollapsibleTrail = (currentDepth: number) => {
  const lines = []
  for (let i = 1; i <= currentDepth; i++) {
    // Calculate leftOffset with additional 0.4rem for each depth level above 1
    const additionalOffset = i > 1 ? (i - 1) * 0.25 : 0
    const leftOffset = i * 1.0 + additionalOffset
    lines.push(<CollapsibleTrail key={i} 
        leftOffset={leftOffset} 
               />
              )
  }
  return lines
}

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
playbook_ui-14.10.0.pre.alpha.play1465attempt25272 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play16825244 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.11.0.pre.rc.11 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.11.0.pre.rc.10 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5214 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5213 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5210 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5208 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5207 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play16825206 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5204 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5201 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.11.0.pre.rc.9 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5200 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.11.0.pre.rc.8 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.11.0.pre.rc.7 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.11.0.pre.rc.6 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.11.0.pre.rc.5 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5193 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx
playbook_ui-14.11.0.pre.rc.4 app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx