Skip to content

Commit e23a481

Browse files
chore(docs): Add example of quick response with icons (#757)
1 parent 9493639 commit e23a481

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { FunctionComponent } from 'react';
22
import Message from '@patternfly/chatbot/dist/dynamic/Message';
33
import patternflyAvatar from './patternfly_avatar.jpg';
4+
import { CopyIcon, WrenchIcon } from '@patternfly/react-icons';
45

56
export const MessageWithQuickResponsesExample: FunctionComponent = () => (
67
<>
@@ -74,5 +75,15 @@ export const MessageWithQuickResponsesExample: FunctionComponent = () => (
7475
]}
7576
isCompact
7677
/>
78+
<Message
79+
name="Bot"
80+
role="bot"
81+
avatar={patternflyAvatar}
82+
content="Example with icons"
83+
quickResponses={[
84+
{ id: '1', content: 'Update your settings', onClick: () => alert('Clicked yes'), icon: <WrenchIcon /> },
85+
{ id: '2', content: 'Copy', onClick: () => alert('Clicked no'), icon: <CopyIcon /> }
86+
]}
87+
/>
7788
</>
7889
);

0 commit comments

Comments
 (0)