diff --git a/packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md b/packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md index 981464fdf..76aff8986 100644 --- a/packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md +++ b/packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/Messages.md @@ -37,6 +37,8 @@ import SourcesCard from '@patternfly/chatbot/dist/dynamic/SourcesCard'; import { RobotIcon } from '@patternfly/react-icons/dist/esm/icons/robot-icon'; import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon'; import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon'; +import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon'; +import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon'; import RedoIcon from '@patternfly/react-icons/dist/esm/icons/redo-icon'; import patternflyAvatar from './patternfly_avatar.jpg'; import AttachmentEdit from '@patternfly/chatbot/dist/dynamic/AttachmentEdit'; diff --git a/packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx b/packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx index db5acf761..afaeab71c 100644 --- a/packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx +++ b/packages/module/patternfly-docs/content/extensions/chatbot/examples/Messages/UserMessageWithExtraContent.tsx @@ -1,53 +1,229 @@ -import { Fragment, FunctionComponent } from 'react'; +import { useState, FunctionComponent } from 'react'; import Message from '@patternfly/chatbot/dist/dynamic/Message'; import userAvatar from './user_avatar.svg'; -import { Alert, Badge, Button, Card, CardBody, CardFooter, CardTitle } from '@patternfly/react-core'; +import { + Button, + Card, + CardBody, + CardFooter, + CardHeader, + CardTitle, + ExpandableSection, + ExpandableSectionToggle, + Flex, + FlexItem, + Label, + Tab, + Tabs, + TabTitleText +} from '@patternfly/react-core'; +import { CubeIcon, CubesIcon } from '@patternfly/react-icons'; + +const VersionSelectorCard = () => { + const [activeTabKey, setActiveTabKey] = useState(0); + const [isCardSelected, setIsCardSelected] = useState(''); + const [isExpanded, setIsExpanded] = useState(false); + const id1 = '4.20'; + const id2 = '4.19'; + const id3 = '4.18'; + const id4 = '4.17'; + + const onChange = (event: React.FormEvent) => { + setIsCardSelected(event.currentTarget.id); + }; + + const onToggleExpandableSection = (isExpanded: boolean) => { + setIsExpanded(isExpanded); + }; + + const handleTabClick = (_event: any, tabIndex: string | number) => { + setActiveTabKey(tabIndex); + }; + + const contentId = 'detached-expandable-section-content'; + const toggleId = 'detached-expandable-section-toggle'; + + const generateTabContent = (title: string, subtitle: string) => ( + + +
{title}
+
{subtitle}
+
+ + + + + + 4.20.0-ec.3 + + + + + + + Developer preview • Not for production + + + + + + + + 4.19.2 + + + + + + + Newest features • 18-month support • Recommended + + + + + + 4.18.19 + + Previous stable • Full support + + + + + + + + + 4.17.34 + + + + + + + Maintenance support phase + + + + + + + + {isExpanded ? 'Hide older versions' : 'Show older versions'} + + +
+ ); -const UserActionEndContent = () => { - // eslint-disable-next-line no-console - const onClick = () => console.log('custom button click'); return ( - - - - + + + + + + + + + Single arch + + + } + > + {generateTabContent('x86_64 Intel/AMD only', 'Standard deployments • Most common choice')} + + + + + + + Multi arch + + + } + > + {generateTabContent('Multi arch', 'Standard deployments')} + + + + + + + ); }; -const CardInformationAfterMainContent = () => ( - - This is content card after main content - Body - Footer - -); - -const BeforeMainContent = () => ( -
- - 7 - - - 24 - -
-); - export const UserMessageWithExtraContent: FunctionComponent = () => ( <> , - afterMainContent: , - endContent: + afterMainContent: }} />