Skip to content

Commit

Permalink
fix: Use ReactNode instead of string whenever is possible
Browse files Browse the repository at this point in the history
 - Allows to customize the text
  • Loading branch information
josejulio committed Jul 8, 2024
1 parent 2c9bab5 commit c571042
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const useStyles = createUseStyles({

interface AssistantMessageEntryProps {
options?: {
title: string;
title: React.ReactNode;
props?: LabelProps
}[],
icon?: React.ComponentClass;
Expand Down
4 changes: 2 additions & 2 deletions packages/module/src/ConversationAlert/ConversationAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Alert, TextContent } from '@patternfly/react-core';
import { createUseStyles } from 'react-jss';

export interface ConversationAlertProps {
/** Text for conversation alert */
title: string;
/** Content for conversation alert */
title: React.ReactNode;
/** Variant type for conversation alert */
variant?: 'success' | 'danger' | 'warning' | 'info' | 'custom';
}
Expand Down
2 changes: 1 addition & 1 deletion packages/module/src/VirtualAssistant/VirtualAssistant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface VirtualAssistantProps {
/** Messages rendered within the assistant */
children?: React.ReactNode;
/** Header title for the assistant */
title?: string;
title?: React.ReactNode;
/** Input's placeholder for the assistant */
inputPlaceholder?: string;
/** Input's content */
Expand Down

0 comments on commit c571042

Please sign in to comment.