MCPcopy Create free account
hub / github.com/github/docs / CollapsibleReleaseSection

Function CollapsibleReleaseSection

components/release-notes/GHAEReleaseNotes.tsx:64–93  ·  view source on GitHub ↗
({
  release,
  focusedPatch,
}: {
  release: GHAEReleaseNotesContextT['releases'][0]
  focusedPatch: string
})

Source from the content-addressed store, hash-verified

62}
63
64const CollapsibleReleaseSection = ({
65 release,
66 focusedPatch,
67}: {
68 release: GHAEReleaseNotesContextT['releases'][0]
69 focusedPatch: string
70}) => {
71 return (
72 <li key={release.version} className="border-bottom">
73 <ul className="list-style-none py-4 px-0 my-0">
74 {release.patches.map((patch) => {
75 const isActive = patch.release === focusedPatch
76 return (
77 <li key={patch.release} className={cx('px-3 my-0', isActive && 'color-bg-accent')}>
78 <a
79 href={`#${patch.release}`}
80 className="d-flex flex-items-center flex-justify-between"
81 >
82 {patch.release}
83 <span className="color-fg-muted text-mono text-small text-normal">
84 {dayjs(patch.date).format('MMMM DD, YYYY')}
85 </span>
86 </a>
87 </li>
88 )
89 })}
90 </ul>
91 </li>
92 )
93}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected