Skip to content

Commit

Permalink
Add labels to button for tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
PopDaph committed Oct 3, 2023
1 parent f7c3ca5 commit b5973d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions front/components/assistant/conversation/AgentMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export function AgentMessage({
? []
: [
{
label: "Copy to clipboard",
icon: ClipboardIcon,
onClick: () => {
void navigator.clipboard.writeText(
Expand All @@ -178,6 +179,7 @@ export function AgentMessage({
},
},
{
label: "Retry",
icon: ArrowPathIcon,
onClick: () => {
void retryHandler(agentMessageToRender);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function ConversationMessage({
name: string | null;
pictureUrl?: string | null;
buttons?: {
label: string;
icon: ComponentType;
onClick: MouseEventHandler<HTMLButtonElement>;
}[];
Expand Down Expand Up @@ -144,7 +145,7 @@ export function ConversationMessage({
<Button
variant="tertiary"
size="xs"
label={""}
label={button.label}
labelVisible={false}
icon={button.icon}
onClick={button.onClick}
Expand Down

0 comments on commit b5973d9

Please sign in to comment.