Skip to content

Commit d545a1a

Browse files
committed
Removed consoles
1 parent 277063a commit d545a1a

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/MessageWithCustomStructure.tsx

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,26 @@ import ResponseActions, { ResponseActionsGroups } from '@patternfly/chatbot/dist
1414
import patternflyAvatar from './patternfly_avatar.jpg';
1515
import userAvatar from './user_avatar.svg';
1616

17+
const handlePositiveResponse = () => {
18+
// Handle positive response
19+
};
20+
21+
const handleNegativeResponse = () => {
22+
// Handle negative response
23+
};
24+
25+
const handleCopy = () => {
26+
// Handle copy action
27+
};
28+
29+
const handleDownload = () => {
30+
// Handle download action
31+
};
32+
33+
const handleListen = () => {
34+
// Handle listen action
35+
};
36+
1737
export const MessageWithCustomStructure: FunctionComponent = () => (
1838
<>
1939
<Message name="Bot" role="bot" avatar={patternflyAvatar}>
@@ -43,21 +63,21 @@ export const MessageWithCustomStructure: FunctionComponent = () => (
4363
<ResponseActionsGroups>
4464
<ResponseActions
4565
actions={{
46-
positive: { onClick: () => console.log('Good response'), ariaLabel: 'Good response' },
47-
negative: { onClick: () => console.log('Bad response'), ariaLabel: 'Bad response' }
66+
positive: { onClick: handlePositiveResponse, ariaLabel: 'Good response' },
67+
negative: { onClick: handleNegativeResponse, ariaLabel: 'Bad response' }
4868
}}
4969
persistActionSelection={true}
5070
/>
5171
<ResponseActions
5272
actions={{
53-
copy: { onClick: () => console.log('Copied!'), ariaLabel: 'Copy' },
54-
download: { onClick: () => console.log('Downloaded!'), ariaLabel: 'Download' }
73+
copy: { onClick: handleCopy, ariaLabel: 'Copy' },
74+
download: { onClick: handleDownload, ariaLabel: 'Download' }
5575
}}
5676
persistActionSelection={false}
5777
/>
5878
<ResponseActions
5979
actions={{
60-
listen: { onClick: () => console.log('Listening'), ariaLabel: 'Listen' }
80+
listen: { onClick: handleListen, ariaLabel: 'Listen' }
6181
}}
6282
persistActionSelection={true}
6383
/>

0 commit comments

Comments
 (0)