-
Notifications
You must be signed in to change notification settings - Fork 25
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 #78 from rohitkrai03/migrate-footer
feat(footer): migrate footer and footnote components
- Loading branch information
Showing
51 changed files
with
1,150 additions
and
169 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
...ontent/extensions/virtual-assistant/examples/ConversationAlert/ConversationAlertBasic.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
32 changes: 32 additions & 0 deletions
32
.../patternfly-docs/content/extensions/virtual-assistant/examples/Footer/Footer.md
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,32 @@ | ||
--- | ||
# Sidenav top-level section | ||
# should be the same for all markdown files | ||
section: extensions | ||
subsection: Chat bots / AI | ||
# Sidenav secondary level section | ||
# should be the same for all markdown files | ||
id: Chatbot Footer | ||
# Tab (react | react-demos | html | html-demos | design-guidelines | accessibility) | ||
source: react | ||
# If you use typescript, the name of the interface to display props for | ||
# These are found through the sourceProps function provided in patternfly-docs.source.js | ||
propComponents: | ||
[ | ||
'Footer', | ||
'MessageBar', | ||
'Footnote', | ||
'FootnotePopover', | ||
'FootnotePopoverCTA', | ||
'FootnotePopoverBannerImage', | ||
'FootnotePopoverLink' | ||
] | ||
--- | ||
|
||
import { Footer, Footnote } from '@patternfly/virtual-assistant/dist/dynamic/Footer'; | ||
import { MessageBar } from '@patternfly/virtual-assistant/dist/dynamic/MessageBar'; | ||
|
||
### Basic example | ||
|
||
```js file="./Footer.tsx" isFullscreen | ||
|
||
``` |
36 changes: 36 additions & 0 deletions
36
...es/module/patternfly-docs/content/extensions/virtual-assistant/examples/Footer/Footer.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,36 @@ | ||
import React from 'react'; | ||
import { Footer, Footnote } from '@patternfly/virtual-assistant/dist/dynamic/Footer'; | ||
import { MessageBar } from '@patternfly/virtual-assistant/dist/dynamic/MessageBar'; | ||
|
||
const footnoteProps = { | ||
label: 'Lightspeed uses AI. Check for mistakes.', | ||
popover: { | ||
title: 'Verify accuracy', | ||
description: `While Lightspeed strives for accuracy, there's always a possibility of errors. It's a good practice to verify critical information from reliable sources, especially if it's crucial for decision-making or actions.`, | ||
bannerImage: { | ||
src: 'https://cdn.dribbble.com/userupload/10651749/file/original-8a07b8e39d9e8bf002358c66fce1223e.gif', | ||
alt: 'Example image for footnote popover' | ||
}, | ||
cta: { | ||
label: 'Got it', | ||
onClick: () => { | ||
alert('Do something!'); | ||
} | ||
}, | ||
link: { | ||
label: 'Learn more', | ||
url: 'https://www.redhat.com/' | ||
} | ||
} | ||
}; | ||
|
||
export const BasicDemo: React.FunctionComponent = () => { | ||
const handleSend = (message) => alert(message); | ||
|
||
return ( | ||
<Footer> | ||
<MessageBar onSendMessage={handleSend} hasMicrophoneButton /> | ||
<Footnote {...footnoteProps} /> | ||
</Footer> | ||
); | ||
}; |
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
2 changes: 1 addition & 1 deletion
2
...content/extensions/virtual-assistant/examples/Messages/VirtualAssistantLoadingMessage.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
2 changes: 1 addition & 1 deletion
2
...ent/extensions/virtual-assistant/examples/Messages/VirtualAssistantSystemMessageEntry.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
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
4 changes: 1 addition & 3 deletions
4
...ontent/extensions/virtual-assistant/examples/VirtualAssistant/VirtualAssistantExample.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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
import React from 'react'; | ||
import VirtualAssistant from '@patternfly/virtual-assistant/dist/dynamic/VirtualAssistant'; | ||
|
||
export const BasicExample: React.FunctionComponent = () => ( | ||
<VirtualAssistant /> | ||
); | ||
export const BasicExample: React.FunctionComponent = () => <VirtualAssistant />; |
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
Oops, something went wrong.