Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/soft-friends-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@node-core/ui-components': patch
---

Allow the ChangeHistory component to accept a ReactNode as it's content
7 changes: 5 additions & 2 deletions packages/ui-components/src/Common/ChangeHistory/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import { ChevronDownIcon, ClockIcon } from '@heroicons/react/24/outline';
import classNames from 'classnames';

import type { LinkLike } from '#ui/types';
import type { FC, ComponentProps } from 'react';
import type { FC, ComponentProps, ReactNode } from 'react';

import styles from './index.module.css';

export type HistoryChange = {
versions: Array<string>;
label: string;
content?: ReactNode;
url?: string;
};

Expand Down Expand Up @@ -51,7 +52,9 @@ const ChangeHistory: FC<ChangeHistoryProps> = ({
aria-label={`${change.label}: ${change.versions.join(', ')}`}
href={change.url}
>
<div className={styles.dropdownLabel}>{change.label}</div>
<div className={styles.dropdownLabel}>
{change.content ?? change.label}
</div>
<div className={styles.dropdownVersions}>
{change.versions.join(', ')}
</div>
Expand Down
Loading