Skip to content

Commit e1a3a5c

Browse files
committed
Update CardModal's title to allow ReactNode
1 parent ac83ff8 commit e1a3a5c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
## [Unreleased]
88
### Added
99
* Add tailwind-based `CopyToClipboardButton` component.
10+
* Allow `CardModal`'s `title` to be any `ReactNode` not just a `string`.
1011

1112
### Changed
1213
* *Nothing*

src/tailwind/feedback/CardModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { useCallback, useEffect, useRef, useState } from 'react';
44
import { Button, CloseButton } from '../form';
55
import { LinkButton } from '../navigation';
66
import { Card } from '../surfaces';
7-
import type { Size } from '../types';
7+
import type { RequiredReactNode, Size } from '../types';
88
import type { ModalDialogProps } from './ModalDialog';
99
import { ModalDialog } from './ModalDialog';
1010

1111
type CommonCardModalProps = {
1212
/** Modal header title */
13-
title: string;
13+
title: RequiredReactNode;
1414
};
1515

1616
type CoverCardModalProps = CommonCardModalProps & {

0 commit comments

Comments
 (0)