-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #272 from rebeccaalpert/stop-button
feat(StopButton): Add StopButton for MessageBar
- Loading branch information
Showing
9 changed files
with
192 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...ocs/content/extensions/virtual-assistant/examples/ChatbotFooter/ChatbotMessageBarStop.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react'; | ||
import { MessageBar } from '@patternfly/virtual-assistant/dist/dynamic/MessageBar'; | ||
|
||
export const ChatbotMessageBarStop: React.FunctionComponent = () => { | ||
const handleSend = (message) => alert(message); | ||
|
||
const handleStopButton = () => alert('Stop button clicked'); | ||
|
||
return <MessageBar handleStopButton={handleStopButton} hasStopButton onSendMessage={handleSend} />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// ============================================================================ | ||
// Chatbot Footer - Message Bar - Stop | ||
// ============================================================================ | ||
.pf-v6-c-button.pf-chatbot__button--stop { | ||
background-color: var(--pf-t--global--color--brand--default); | ||
border-radius: var(--pf-t--global--border--radius--pill); | ||
padding: var(--pf-t--global--spacer--md); | ||
width: 3rem; | ||
height: 3rem; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
.pf-v6-c-button__icon { | ||
color: var(--pf-t--global--icon--color--inverse); | ||
} | ||
|
||
&:hover, | ||
&:focus { | ||
background-color: var(--pf-t--global--color--brand--hover); | ||
} | ||
} |
Oops, something went wrong.