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

Function VersionCell

examples/preact/basic/src/package-json-panel.tsx:125–156  ·  view source on GitHub ↗
({
    dep,
    specified,
  }: {
    dep: string
    specified: string
  })

Source from the content-addressed store, hash-verified

123 )
124
125 const VersionCell = ({
126 dep,
127 specified,
128 }: {
129 dep: string
130 specified: string
131 }) => {
132 const info = outdatedDeps[dep] as
133 | {
134 current: string
135 wanted: string
136 latest: string
137 type?: 'dependencies' | 'devDependencies'
138 }
139 | undefined
140 const current = info?.current ?? specified
141 const latest = info?.latest
142 const dt = info ? diffType(current, latest) : null
143 return (
144 <div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
145 <span>{current}</span>
146 {dt && latest ? (
147 <span
148 style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}
149 >
150 <span style={{ opacity: 0.6 }}>→</span>
151 {badge(`latest ${latest}`, diffColor[dt])}
152 </span>
153 ) : null}
154 </div>
155 )
156 }
157
158 const UpgradeRowActions = ({ name }: { name: string }) => {
159 const info = outdatedDeps[name] as

Callers

nothing calls this directly

Calls 2

diffTypeFunction · 0.70
badgeFunction · 0.70

Tested by

no test coverage detected