@patternfly/quickstarts 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +546 -0
- package/dist/ConsoleInternal/components/markdown-view.d.ts +19 -0
- package/dist/ConsoleInternal/components/utils/camel-case-wrap.d.ts +6 -0
- package/dist/ConsoleInternal/components/utils/index.d.ts +3 -0
- package/dist/ConsoleInternal/components/utils/router.d.ts +9 -0
- package/dist/ConsoleInternal/components/utils/status-box.d.ts +20 -0
- package/dist/ConsoleInternal/module/k8s/types.d.ts +42 -0
- package/dist/ConsoleShared/index.d.ts +1 -0
- package/dist/ConsoleShared/src/components/index.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/MarkdownCopyClipboard.d.ts +13 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/accordion-extension.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/accordion-render-extension.d.ts +6 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/admonition-extension.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/code-extension.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/const.d.ts +5 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/index.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-extensions/utils.d.ts +1 -0
- package/dist/ConsoleShared/src/components/markdown-highlight-extension/MarkdownHighlightExtension.d.ts +7 -0
- package/dist/ConsoleShared/src/components/markdown-highlight-extension/highlight-consts.d.ts +4 -0
- package/dist/ConsoleShared/src/components/markdown-highlight-extension/index.d.ts +1 -0
- package/dist/ConsoleShared/src/components/modal/Modal.d.ts +9 -0
- package/dist/ConsoleShared/src/components/modal/index.d.ts +1 -0
- package/dist/ConsoleShared/src/components/popper/Portal.d.ts +8 -0
- package/dist/ConsoleShared/src/components/popper/SimplePopper.d.ts +6 -0
- package/dist/ConsoleShared/src/components/popper/index.d.ts +2 -0
- package/dist/ConsoleShared/src/components/spotlight/InteractiveSpotlight.d.ts +7 -0
- package/dist/ConsoleShared/src/components/spotlight/Spotlight.d.ts +7 -0
- package/dist/ConsoleShared/src/components/spotlight/StaticSpotlight.d.ts +7 -0
- package/dist/ConsoleShared/src/components/spotlight/index.d.ts +1 -0
- package/dist/ConsoleShared/src/components/status/GenericStatus.d.ts +12 -0
- package/dist/ConsoleShared/src/components/status/NotStartedIcon.d.ts +3 -0
- package/dist/ConsoleShared/src/components/status/PopoverStatus.d.ts +13 -0
- package/dist/ConsoleShared/src/components/status/Status.d.ts +11 -0
- package/dist/ConsoleShared/src/components/status/StatusIconAndText.d.ts +8 -0
- package/dist/ConsoleShared/src/components/status/icons.d.ts +9 -0
- package/dist/ConsoleShared/src/components/status/index.d.ts +1 -0
- package/dist/ConsoleShared/src/components/status/statuses.d.ts +5 -0
- package/dist/ConsoleShared/src/components/status/types.d.ts +9 -0
- package/dist/ConsoleShared/src/components/utils/FallbackImg.d.ts +9 -0
- package/dist/ConsoleShared/src/components/utils/index.d.ts +1 -0
- package/dist/ConsoleShared/src/constants/index.d.ts +1 -0
- package/dist/ConsoleShared/src/constants/ui.d.ts +1 -0
- package/dist/ConsoleShared/src/hooks/index.d.ts +6 -0
- package/dist/ConsoleShared/src/hooks/scroll.d.ts +8 -0
- package/dist/ConsoleShared/src/hooks/useBoundingClientRect.d.ts +3 -0
- package/dist/ConsoleShared/src/hooks/useEventListener.d.ts +1 -0
- package/dist/ConsoleShared/src/hooks/useForceRender.d.ts +4 -0
- package/dist/ConsoleShared/src/hooks/useResizeObserver.d.ts +1 -0
- package/dist/ConsoleShared/src/hooks/useScrollShadows.d.ts +7 -0
- package/dist/ConsoleShared/src/index.d.ts +4 -0
- package/dist/ConsoleShared/src/utils/index.d.ts +1 -0
- package/dist/ConsoleShared/src/utils/useCombineRefs.d.ts +2 -0
- package/dist/HelpTopicDrawer.d.ts +33 -0
- package/dist/HelpTopicPanelContent.d.ts +11 -0
- package/dist/QuickStartCatalogPage.d.ts +14 -0
- package/dist/QuickStartCloseModal.d.ts +8 -0
- package/dist/QuickStartController.d.ts +10 -0
- package/dist/QuickStartDrawer.d.ts +62 -0
- package/dist/QuickStartMarkdownView.d.ts +9 -0
- package/dist/QuickStartPanelContent.d.ts +15 -0
- package/dist/catalog/Catalog/QuickStartCatalogHeader.d.ts +6 -0
- package/dist/catalog/Catalog/QuickStartCatalogSection.d.ts +5 -0
- package/dist/catalog/Catalog/QuickStartCatalogToolbar.d.ts +5 -0
- package/dist/catalog/Catalog/index.d.ts +3 -0
- package/dist/catalog/QuickStartCatalog.d.ts +8 -0
- package/dist/catalog/QuickStartTile.d.ts +14 -0
- package/dist/catalog/QuickStartTileDescription.d.ts +8 -0
- package/dist/catalog/QuickStartTileFooter.d.ts +8 -0
- package/dist/catalog/QuickStartTileFooterExternal.d.ts +8 -0
- package/dist/catalog/QuickStartTileHeader.d.ts +24 -0
- package/dist/catalog/Toolbar/QuickStartCatalogFilter.d.ts +10 -0
- package/dist/catalog/Toolbar/QuickStartCatalogFilterItems.d.ts +31 -0
- package/dist/catalog/index.d.ts +9 -0
- package/dist/controller/QuickStartConclusion.d.ts +12 -0
- package/dist/controller/QuickStartContent.d.ts +14 -0
- package/dist/controller/QuickStartFooter.d.ts +14 -0
- package/dist/controller/QuickStartIntroduction.d.ts +12 -0
- package/dist/controller/QuickStartTaskHeader.d.ts +15 -0
- package/dist/controller/QuickStartTaskHeaderList.d.ts +10 -0
- package/dist/controller/QuickStartTaskReview.d.ts +10 -0
- package/dist/controller/QuickStartTasks.d.ts +12 -0
- package/dist/data/mocks/json/explore-pipeline-quickstart.d.ts +2 -0
- package/dist/data/mocks/json/explore-serverless-quickstart.d.ts +2 -0
- package/dist/data/mocks/json/monitor-sampleapp-quickstart.d.ts +2 -0
- package/dist/data/mocks/json/tour-icons.d.ts +2 -0
- package/dist/data/quick-start-test-data.d.ts +2 -0
- package/dist/data/test-utils.d.ts +8 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.es.js +2593 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +2695 -0
- package/dist/index.js.map +1 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/design-guidelines.md +105 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/card-elements copy.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/card-elements.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/catalog-elements.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/check-your-work.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/introduction-screen.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/mixed-catalog.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/prerequisites.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/qs-context.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/side-panel-elements.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/side-panel-resized.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/side-panel.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/task-no.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/task-yes.png +0 -0
- package/dist/patternfly-docs/quick-starts/design-guidelines/img/task.png +0 -0
- package/dist/patternfly-docs/quick-starts/examples/Basic.jsx +73 -0
- package/dist/patternfly-docs/quick-starts/examples/HelpTopic.jsx +51 -0
- package/dist/patternfly-docs/quick-starts/examples/about.md +84 -0
- package/dist/patternfly-docs/quick-starts/examples/basic.md +29 -0
- package/dist/patternfly-docs/quick-starts/examples/example-data/example-help-topics.js +173 -0
- package/dist/patternfly-docs/quick-starts/examples/example-data/example-quickstarts.js +215 -0
- package/dist/patternfly-docs/quick-starts/examples/example-data/index.js +15 -0
- package/dist/patternfly-docs/quick-starts/examples/help-topics.md +28 -0
- package/dist/patternfly-docs/quick-starts/examples/img/catalog.png +0 -0
- package/dist/patternfly-docs/quick-starts/examples/img/help-topic.png +0 -0
- package/dist/patternfly-docs/quick-starts/examples/img/side-panel.png +0 -0
- package/dist/patternfly-global.css +1302 -0
- package/dist/patternfly-nested.css +11812 -0
- package/dist/quickstarts-base.css +1219 -0
- package/dist/quickstarts-full.es.js +31861 -0
- package/dist/quickstarts-full.es.js.map +1 -0
- package/dist/quickstarts-standalone.css +868 -0
- package/dist/quickstarts-standalone.min.css +4 -0
- package/dist/quickstarts-vendor.css +165 -0
- package/dist/quickstarts.css +1383 -0
- package/dist/quickstarts.min.css +1 -0
- package/dist/styles/patternfly-global-entry.d.ts +1 -0
- package/dist/styles/patternfly-nested-entry.d.ts +1 -0
- package/dist/styles/quickstarts-standalone-entry.d.ts +1 -0
- package/dist/styles/vendor-entry.d.ts +1 -0
- package/dist/utils/PluralResolver.d.ts +16 -0
- package/dist/utils/asciidoc-procedure-parser.d.ts +12 -0
- package/dist/utils/const.d.ts +6 -0
- package/dist/utils/help-topic-context.d.ts +23 -0
- package/dist/utils/help-topic-types.d.ts +13 -0
- package/dist/utils/quick-start-context.d.ts +81 -0
- package/dist/utils/quick-start-types.d.ts +60 -0
- package/dist/utils/quick-start-utils.d.ts +10 -0
- package/dist/utils/useLocalStorage.d.ts +1 -0
- package/dist/vendor.js +2 -0
- package/dist/vendor.js.map +1 -0
- package/package.json +105 -0
- package/src/ConsoleInternal/components/_icon-and-text.scss +14 -0
- package/src/ConsoleInternal/components/_markdown-view.scss +19 -0
- package/src/ConsoleInternal/components/catalog/_catalog.scss +392 -0
- package/src/ConsoleInternal/components/markdown-view.tsx +276 -0
- package/src/ConsoleInternal/components/utils/_status-box.scss +58 -0
- package/src/ConsoleInternal/components/utils/camel-case-wrap.tsx +33 -0
- package/src/ConsoleInternal/components/utils/index.tsx +3 -0
- package/src/ConsoleInternal/components/utils/router.ts +45 -0
- package/src/ConsoleInternal/components/utils/status-box.tsx +56 -0
- package/src/ConsoleInternal/module/k8s/types.ts +53 -0
- package/src/ConsoleShared/index.ts +1 -0
- package/src/ConsoleShared/src/components/index.ts +7 -0
- package/src/ConsoleShared/src/components/layout/PageLayout.scss +29 -0
- package/src/ConsoleShared/src/components/markdown-extensions/MarkdownCopyClipboard.tsx +95 -0
- package/src/ConsoleShared/src/components/markdown-extensions/__tests__/MarkdownCopyClipboard.spec.tsx +25 -0
- package/src/ConsoleShared/src/components/markdown-extensions/__tests__/test-data.ts +5 -0
- package/src/ConsoleShared/src/components/markdown-extensions/accordion-extension.tsx +51 -0
- package/src/ConsoleShared/src/components/markdown-extensions/accordion-render-extension.tsx +60 -0
- package/src/ConsoleShared/src/components/markdown-extensions/admonition-extension.tsx +67 -0
- package/src/ConsoleShared/src/components/markdown-extensions/code-extension.tsx +23 -0
- package/src/ConsoleShared/src/components/markdown-extensions/const.ts +5 -0
- package/src/ConsoleShared/src/components/markdown-extensions/index.ts +7 -0
- package/src/ConsoleShared/src/components/markdown-extensions/inline-clipboard-extension.tsx +39 -0
- package/src/ConsoleShared/src/components/markdown-extensions/multiline-clipboard-extension.tsx +44 -0
- package/src/ConsoleShared/src/components/markdown-extensions/showdown-extension.scss +52 -0
- package/src/ConsoleShared/src/components/markdown-extensions/utils.ts +1 -0
- package/src/ConsoleShared/src/components/markdown-highlight-extension/MarkdownHighlightExtension.tsx +65 -0
- package/src/ConsoleShared/src/components/markdown-highlight-extension/highlight-consts.ts +9 -0
- package/src/ConsoleShared/src/components/markdown-highlight-extension/index.ts +1 -0
- package/src/ConsoleShared/src/components/modal/Modal.scss +3 -0
- package/src/ConsoleShared/src/components/modal/Modal.tsx +19 -0
- package/src/ConsoleShared/src/components/modal/index.ts +1 -0
- package/src/ConsoleShared/src/components/popper/Portal.tsx +25 -0
- package/src/ConsoleShared/src/components/popper/SimplePopper.tsx +92 -0
- package/src/ConsoleShared/src/components/popper/index.ts +2 -0
- package/src/ConsoleShared/src/components/spotlight/InteractiveSpotlight.tsx +58 -0
- package/src/ConsoleShared/src/components/spotlight/Spotlight.tsx +35 -0
- package/src/ConsoleShared/src/components/spotlight/StaticSpotlight.tsx +32 -0
- package/src/ConsoleShared/src/components/spotlight/index.ts +1 -0
- package/src/ConsoleShared/src/components/spotlight/spotlight.scss +63 -0
- package/src/ConsoleShared/src/components/status/GenericStatus.tsx +34 -0
- package/src/ConsoleShared/src/components/status/NotStartedIcon.tsx +27 -0
- package/src/ConsoleShared/src/components/status/PopoverStatus.tsx +39 -0
- package/src/ConsoleShared/src/components/status/Status.tsx +38 -0
- package/src/ConsoleShared/src/components/status/StatusIconAndText.tsx +42 -0
- package/src/ConsoleShared/src/components/status/icons.tsx +39 -0
- package/src/ConsoleShared/src/components/status/index.tsx +1 -0
- package/src/ConsoleShared/src/components/status/statuses.tsx +20 -0
- package/src/ConsoleShared/src/components/status/types.ts +8 -0
- package/src/ConsoleShared/src/components/utils/FallbackImg.tsx +20 -0
- package/src/ConsoleShared/src/components/utils/index.ts +1 -0
- package/src/ConsoleShared/src/constants/index.ts +1 -0
- package/src/ConsoleShared/src/constants/ui.ts +1 -0
- package/src/ConsoleShared/src/hooks/index.ts +6 -0
- package/src/ConsoleShared/src/hooks/scroll.ts +52 -0
- package/src/ConsoleShared/src/hooks/useBoundingClientRect.ts +18 -0
- package/src/ConsoleShared/src/hooks/useEventListener.ts +14 -0
- package/src/ConsoleShared/src/hooks/useForceRender.ts +6 -0
- package/src/ConsoleShared/src/hooks/useResizeObserver.ts +19 -0
- package/src/ConsoleShared/src/hooks/useScrollShadows.ts +45 -0
- package/src/ConsoleShared/src/index.ts +4 -0
- package/src/ConsoleShared/src/utils/index.ts +1 -0
- package/src/ConsoleShared/src/utils/useCombineRefs.ts +16 -0
- package/src/HelpTopicDrawer.tsx +116 -0
- package/src/HelpTopicPanelContent.tsx +160 -0
- package/src/QuickStartCatalogPage.tsx +195 -0
- package/src/QuickStartCloseModal.tsx +47 -0
- package/src/QuickStartController.tsx +111 -0
- package/src/QuickStartDrawer.scss +11 -0
- package/src/QuickStartDrawer.tsx +265 -0
- package/src/QuickStartMarkdownView.tsx +80 -0
- package/src/QuickStartPanelContent.scss +46 -0
- package/src/QuickStartPanelContent.tsx +165 -0
- package/src/__tests__/quick-start-utils.spec.tsx +16 -0
- package/src/catalog/Catalog/QuickStartCatalogHeader.tsx +18 -0
- package/src/catalog/Catalog/QuickStartCatalogSection.tsx +9 -0
- package/src/catalog/Catalog/QuickStartCatalogToolbar.tsx +12 -0
- package/src/catalog/Catalog/index.ts +3 -0
- package/src/catalog/QuickStartCatalog.scss +8 -0
- package/src/catalog/QuickStartCatalog.tsx +42 -0
- package/src/catalog/QuickStartTile.scss +11 -0
- package/src/catalog/QuickStartTile.tsx +129 -0
- package/src/catalog/QuickStartTileDescription.scss +29 -0
- package/src/catalog/QuickStartTileDescription.tsx +79 -0
- package/src/catalog/QuickStartTileFooter.tsx +101 -0
- package/src/catalog/QuickStartTileFooterExternal.tsx +40 -0
- package/src/catalog/QuickStartTileHeader.scss +16 -0
- package/src/catalog/QuickStartTileHeader.tsx +105 -0
- package/src/catalog/Toolbar/QuickStartCatalogFilter.scss +25 -0
- package/src/catalog/Toolbar/QuickStartCatalogFilter.tsx +32 -0
- package/src/catalog/Toolbar/QuickStartCatalogFilterItems.tsx +218 -0
- package/src/catalog/__tests__/QuickStartCatalog.spec.tsx +35 -0
- package/src/catalog/__tests__/QuickStartTile.spec.tsx +38 -0
- package/src/catalog/__tests__/QuickStartTileDescription.spec.tsx +44 -0
- package/src/catalog/index.ts +9 -0
- package/src/controller/QuickStartConclusion.tsx +63 -0
- package/src/controller/QuickStartContent.scss +12 -0
- package/src/controller/QuickStartContent.tsx +72 -0
- package/src/controller/QuickStartFooter.scss +13 -0
- package/src/controller/QuickStartFooter.tsx +124 -0
- package/src/controller/QuickStartIntroduction.scss +35 -0
- package/src/controller/QuickStartIntroduction.tsx +64 -0
- package/src/controller/QuickStartTaskHeader.scss +58 -0
- package/src/controller/QuickStartTaskHeader.tsx +125 -0
- package/src/controller/QuickStartTaskHeaderList.scss +17 -0
- package/src/controller/QuickStartTaskHeaderList.tsx +33 -0
- package/src/controller/QuickStartTaskReview.scss +30 -0
- package/src/controller/QuickStartTaskReview.tsx +81 -0
- package/src/controller/QuickStartTasks.scss +89 -0
- package/src/controller/QuickStartTasks.tsx +75 -0
- package/src/controller/__tests__/QuickStartConclusion.spec.tsx +95 -0
- package/src/controller/__tests__/QuickStartContent.spec.tsx +52 -0
- package/src/controller/__tests__/QuickStartFooter.spec.tsx +148 -0
- package/src/controller/__tests__/QuickStartTaskHeader.spec.tsx +43 -0
- package/src/controller/__tests__/QuickStartTaskReview.spec.tsx +45 -0
- package/src/controller/__tests__/QuickStartTasks.spec.tsx +81 -0
- package/src/data/mocks/json/explore-pipeline-quickstart.ts +66 -0
- package/src/data/mocks/json/explore-serverless-quickstart.ts +90 -0
- package/src/data/mocks/json/monitor-sampleapp-quickstart.ts +77 -0
- package/src/data/mocks/json/tour-icons.ts +3 -0
- package/src/data/mocks/yamls/add-healthchecks-quickstart.yaml +67 -0
- package/src/data/mocks/yamls/explore-pipeline-quickstart.yaml +57 -0
- package/src/data/mocks/yamls/explore-serverless-quickstart.yaml +83 -0
- package/src/data/mocks/yamls/install-associate-pipeline-quickstart.yaml +74 -0
- package/src/data/mocks/yamls/monitor-sampleapp-quickstart.yaml +66 -0
- package/src/data/mocks/yamls/sample-application-quickstart.yaml +97 -0
- package/src/data/mocks/yamls/serverless-application-quickstart.yaml +141 -0
- package/src/data/quick-start-test-data.ts +10 -0
- package/src/data/test-utils.ts +11 -0
- package/src/declaration.d.ts +2 -0
- package/src/index.ts +17 -0
- package/src/locales/en/quickstart.json +46 -0
- package/src/styles/_base.scss +54 -0
- package/src/styles/_dark-custom-override.scss +62 -0
- package/src/styles/legacy-bootstrap/README.md +21 -0
- package/src/styles/legacy-bootstrap/_code.scss +46 -0
- package/src/styles/legacy-bootstrap/_tables.scss +38 -0
- package/src/styles/legacy-bootstrap/_type.scss +92 -0
- package/src/styles/legacy-bootstrap/_variables.scss +48 -0
- package/src/styles/legacy-bootstrap.scss +5 -0
- package/src/styles/patternfly-global-entry.ts +1 -0
- package/src/styles/patternfly-global.scss +28 -0
- package/src/styles/patternfly-nested-entry.ts +1 -0
- package/src/styles/patternfly-nested.scss +18 -0
- package/src/styles/quickstarts-standalone-entry.ts +1 -0
- package/src/styles/quickstarts-standalone.scss +7 -0
- package/src/styles/style.scss +12 -0
- package/src/styles/vendor-entry.ts +1 -0
- package/src/styles/vendor.scss +7 -0
- package/src/utils/PluralResolver.ts +362 -0
- package/src/utils/asciidoc-procedure-parser.ts +130 -0
- package/src/utils/const.ts +10 -0
- package/src/utils/help-topic-context.tsx +72 -0
- package/src/utils/help-topic-types.ts +16 -0
- package/src/utils/quick-start-context.tsx +473 -0
- package/src/utils/quick-start-types.ts +73 -0
- package/src/utils/quick-start-utils.ts +88 -0
- package/src/utils/useLocalStorage.ts +38 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
|
|
3
|
+
import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
4
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
5
|
+
import dangerColor from '@patternfly/react-tokens/dist/esm/global_danger_color_100';
|
|
6
|
+
import blueInfoColor from '@patternfly/react-tokens/dist/esm/global_palette_blue_300';
|
|
7
|
+
import okColor from '@patternfly/react-tokens/dist/esm/global_palette_green_500';
|
|
8
|
+
import { Icon } from '@patternfly/react-core';
|
|
9
|
+
|
|
10
|
+
export const GreenCheckCircleIcon: React.FC<ColoredIconProps> = ({ className, title, size }) => (
|
|
11
|
+
<Icon size={size}>
|
|
12
|
+
<CheckCircleIcon
|
|
13
|
+
data-test="success-icon"
|
|
14
|
+
color={okColor.value}
|
|
15
|
+
className={className}
|
|
16
|
+
title={title}
|
|
17
|
+
/>
|
|
18
|
+
</Icon>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
export const RedExclamationCircleIcon: React.FC<ColoredIconProps> = ({
|
|
22
|
+
className,
|
|
23
|
+
title,
|
|
24
|
+
size,
|
|
25
|
+
}) => (
|
|
26
|
+
<Icon size={size}>
|
|
27
|
+
<ExclamationCircleIcon color={dangerColor.value} className={className} title={title} />
|
|
28
|
+
</Icon>
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export const BlueInfoCircleIcon: React.FC<ColoredIconProps> = ({ className, title }) => (
|
|
32
|
+
<InfoCircleIcon color={blueInfoColor.value} className={className} title={title} />
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export interface ColoredIconProps {
|
|
36
|
+
className?: string;
|
|
37
|
+
title?: string;
|
|
38
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Status';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import GenericStatus from './GenericStatus';
|
|
4
|
+
import { BlueInfoCircleIcon, GreenCheckCircleIcon, RedExclamationCircleIcon } from './icons';
|
|
5
|
+
import { StatusComponentProps } from './types';
|
|
6
|
+
|
|
7
|
+
export const ErrorStatus: React.FC<StatusComponentProps> = (props) => (
|
|
8
|
+
<GenericStatus {...props} Icon={RedExclamationCircleIcon} title={props.title || 'Error'} />
|
|
9
|
+
);
|
|
10
|
+
ErrorStatus.displayName = 'ErrorStatus';
|
|
11
|
+
|
|
12
|
+
export const InfoStatus: React.FC<StatusComponentProps> = (props) => (
|
|
13
|
+
<GenericStatus {...props} Icon={BlueInfoCircleIcon} title={props.title || 'Information'} />
|
|
14
|
+
);
|
|
15
|
+
InfoStatus.displayName = 'InfoStatus';
|
|
16
|
+
|
|
17
|
+
export const SuccessStatus: React.FC<StatusComponentProps> = (props) => (
|
|
18
|
+
<GenericStatus {...props} Icon={GreenCheckCircleIcon} title={props.title || 'Healthy'} />
|
|
19
|
+
);
|
|
20
|
+
SuccessStatus.displayName = 'SuccessStatus';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface FallbackImgProps {
|
|
4
|
+
src: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
fallback?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const FallbackImg: React.FC<FallbackImgProps> = ({ src, alt, className, fallback }) => {
|
|
11
|
+
const [isSrcValid, setIsSrcValid] = React.useState<boolean>(true);
|
|
12
|
+
|
|
13
|
+
if (src && isSrcValid) {
|
|
14
|
+
return <img className={className} src={src} alt={alt} onError={() => setIsSrcValid(false)} />;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return <>{fallback}</>;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default FallbackImg;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FallbackImg } from './FallbackImg';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ui';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const DASH = '-';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export enum ScrollDirection {
|
|
4
|
+
scrollingUp = 'scrolling-up',
|
|
5
|
+
scrollingDown = 'scrolling-down',
|
|
6
|
+
scrolledToBottom = 'scrolled-to-bottom',
|
|
7
|
+
scrolledToTop = 'scrolled-to-top',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const getScrollDirection = (
|
|
11
|
+
prevScrollTop: number,
|
|
12
|
+
currentScrollTop: number,
|
|
13
|
+
scrollHeight: number,
|
|
14
|
+
clientHeight: number,
|
|
15
|
+
) => {
|
|
16
|
+
let direction;
|
|
17
|
+
if (scrollHeight - currentScrollTop === clientHeight) {
|
|
18
|
+
direction = ScrollDirection.scrolledToBottom;
|
|
19
|
+
} else if (currentScrollTop === 0) {
|
|
20
|
+
direction = ScrollDirection.scrolledToTop;
|
|
21
|
+
} else if (prevScrollTop > currentScrollTop) {
|
|
22
|
+
direction = ScrollDirection.scrollingUp;
|
|
23
|
+
} else if (prevScrollTop < currentScrollTop) {
|
|
24
|
+
direction = ScrollDirection.scrollingDown;
|
|
25
|
+
}
|
|
26
|
+
return direction;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const useScrollDirection = (): [ScrollDirection, (event) => void] => {
|
|
30
|
+
const scrollPosition = React.useRef<number>(null);
|
|
31
|
+
const [scrollDirection, setScrollDirection] = React.useState<ScrollDirection>(null);
|
|
32
|
+
const handleScroll = React.useCallback(
|
|
33
|
+
(event) => {
|
|
34
|
+
const { scrollHeight, scrollTop, clientHeight } = event.target;
|
|
35
|
+
if (scrollPosition.current !== null) {
|
|
36
|
+
const direction = getScrollDirection(
|
|
37
|
+
scrollPosition.current,
|
|
38
|
+
scrollTop,
|
|
39
|
+
scrollHeight,
|
|
40
|
+
clientHeight,
|
|
41
|
+
);
|
|
42
|
+
if (direction && direction !== scrollDirection) {
|
|
43
|
+
setScrollDirection(direction);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
scrollPosition.current = scrollTop;
|
|
47
|
+
},
|
|
48
|
+
[scrollDirection],
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
return [scrollDirection, handleScroll];
|
|
52
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useResizeObserver } from './useResizeObserver';
|
|
3
|
+
|
|
4
|
+
type BoundingClientRect = ClientRect | null;
|
|
5
|
+
|
|
6
|
+
export const useBoundingClientRect = (targetElement: HTMLElement | null): BoundingClientRect => {
|
|
7
|
+
const [clientRect, setClientRect] = React.useState<BoundingClientRect>(() =>
|
|
8
|
+
targetElement ? targetElement.getBoundingClientRect() : null,
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
const observerCallback = React.useCallback(() => {
|
|
12
|
+
setClientRect(targetElement ? targetElement.getBoundingClientRect() : null);
|
|
13
|
+
}, [targetElement]);
|
|
14
|
+
|
|
15
|
+
useResizeObserver(observerCallback);
|
|
16
|
+
|
|
17
|
+
return clientRect;
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
export const useEventListener = (
|
|
4
|
+
target: EventTarget,
|
|
5
|
+
event: keyof WindowEventMap,
|
|
6
|
+
callback: EventListener,
|
|
7
|
+
) => {
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
target.addEventListener(event, callback);
|
|
10
|
+
return () => {
|
|
11
|
+
target.removeEventListener(event, callback);
|
|
12
|
+
};
|
|
13
|
+
}, [target, event, callback]);
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export const useResizeObserver = (
|
|
4
|
+
callback: ResizeObserverCallback,
|
|
5
|
+
targetElement?: HTMLElement | null,
|
|
6
|
+
observerOptions: ResizeObserverOptions = undefined,
|
|
7
|
+
): void => {
|
|
8
|
+
const element = React.useMemo(
|
|
9
|
+
() => targetElement ?? document.querySelector('body'),
|
|
10
|
+
[targetElement],
|
|
11
|
+
);
|
|
12
|
+
React.useEffect(() => {
|
|
13
|
+
const observer = new ResizeObserver(callback);
|
|
14
|
+
observer.observe(element, observerOptions);
|
|
15
|
+
return () => {
|
|
16
|
+
observer.disconnect();
|
|
17
|
+
};
|
|
18
|
+
}, [callback, observerOptions, element]);
|
|
19
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useResizeObserver } from './useResizeObserver';
|
|
3
|
+
|
|
4
|
+
export enum Shadows {
|
|
5
|
+
none = 'none',
|
|
6
|
+
both = 'both',
|
|
7
|
+
top = 'top',
|
|
8
|
+
bottom = 'bottom',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const useScrollShadows = (node: HTMLElement): Shadows => {
|
|
12
|
+
const [shadows, setShadows] = React.useState(Shadows.none);
|
|
13
|
+
const computeShadows = React.useCallback(() => {
|
|
14
|
+
if (node) {
|
|
15
|
+
const { scrollTop, clientHeight, scrollHeight } = node;
|
|
16
|
+
const top = scrollTop !== 0;
|
|
17
|
+
const bottom = scrollTop + clientHeight < scrollHeight;
|
|
18
|
+
if (top && bottom) {
|
|
19
|
+
setShadows(Shadows.both);
|
|
20
|
+
} else if (top) {
|
|
21
|
+
setShadows(Shadows.top);
|
|
22
|
+
} else if (bottom) {
|
|
23
|
+
setShadows(Shadows.bottom);
|
|
24
|
+
} else {
|
|
25
|
+
setShadows(Shadows.none);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}, [node]);
|
|
29
|
+
// recompute when the scroll container changes in size
|
|
30
|
+
useResizeObserver(computeShadows, node);
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
if (node) {
|
|
33
|
+
// compute initial shadows
|
|
34
|
+
computeShadows();
|
|
35
|
+
// listen for scroll events
|
|
36
|
+
node.addEventListener('scroll', computeShadows);
|
|
37
|
+
}
|
|
38
|
+
return () => {
|
|
39
|
+
if (node) {
|
|
40
|
+
node.removeEventListener('scroll', computeShadows);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}, [node, computeShadows]);
|
|
44
|
+
return shadows;
|
|
45
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useCombineRefs';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export const useCombineRefs = <RefType>(...refs: (React.Ref<RefType> | undefined)[]) =>
|
|
4
|
+
React.useCallback(
|
|
5
|
+
(element: RefType | null): void =>
|
|
6
|
+
refs.forEach((ref) => {
|
|
7
|
+
if (ref) {
|
|
8
|
+
if (typeof ref === 'function') {
|
|
9
|
+
ref(element);
|
|
10
|
+
} else {
|
|
11
|
+
(ref as React.MutableRefObject<any>).current = element;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}),
|
|
15
|
+
[refs],
|
|
16
|
+
);
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import './QuickStartDrawer.scss';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Drawer, DrawerContent, DrawerContentBody } from '@patternfly/react-core';
|
|
4
|
+
import HelpTopicPanelContent from './HelpTopicPanelContent';
|
|
5
|
+
import {
|
|
6
|
+
HelpTopicContext,
|
|
7
|
+
HelpTopicContextValues,
|
|
8
|
+
useValuesForHelpTopicContext,
|
|
9
|
+
} from './utils/help-topic-context';
|
|
10
|
+
import { QuickStartContextValues } from './utils/quick-start-context';
|
|
11
|
+
import { HelpTopic } from './utils/help-topic-types';
|
|
12
|
+
|
|
13
|
+
export interface HelpTopicContainerProps extends React.HTMLProps<HTMLDivElement> {
|
|
14
|
+
/** array of HelpTopics */
|
|
15
|
+
helpTopics: HelpTopic[];
|
|
16
|
+
/** text resources object
|
|
17
|
+
* Add custom strings: https://github.com/patternfly/patternfly-quickstarts/tree/main/packages/module#localization
|
|
18
|
+
*/
|
|
19
|
+
resourceBundle?: any;
|
|
20
|
+
/** language of the current resource bundle */
|
|
21
|
+
language?: string;
|
|
22
|
+
/** if true, will show a loading spinner on the catalog page (default false) */
|
|
23
|
+
loading?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Additional markdown extensions and renderers to use
|
|
26
|
+
* Example usage: https://github.com/patternfly/patternfly-quickstarts/tree/main/packages/module#markdown-extensions
|
|
27
|
+
*/
|
|
28
|
+
markdown?: {
|
|
29
|
+
extensions?: any[];
|
|
30
|
+
renderExtension?: (docContext: Document, rootSelector: string) => React.ReactNode;
|
|
31
|
+
};
|
|
32
|
+
/** additional quick start context props */
|
|
33
|
+
contextProps?: QuickStartContextValues;
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const HelpTopicContainer: React.FC<HelpTopicContainerProps> = ({
|
|
38
|
+
helpTopics,
|
|
39
|
+
children,
|
|
40
|
+
resourceBundle,
|
|
41
|
+
language,
|
|
42
|
+
loading = false,
|
|
43
|
+
markdown,
|
|
44
|
+
contextProps,
|
|
45
|
+
...props
|
|
46
|
+
}: HelpTopicContainerProps) => {
|
|
47
|
+
const valuesForHelpTopicContext: HelpTopicContextValues = useValuesForHelpTopicContext({
|
|
48
|
+
helpTopics,
|
|
49
|
+
language,
|
|
50
|
+
resourceBundle: {
|
|
51
|
+
...resourceBundle,
|
|
52
|
+
},
|
|
53
|
+
loading,
|
|
54
|
+
markdown,
|
|
55
|
+
...contextProps,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
React.useEffect(() => {
|
|
59
|
+
if (loading !== valuesForHelpTopicContext.loading) {
|
|
60
|
+
valuesForHelpTopicContext.setLoading(loading);
|
|
61
|
+
}
|
|
62
|
+
}, [loading, valuesForHelpTopicContext]);
|
|
63
|
+
|
|
64
|
+
React.useEffect(() => {
|
|
65
|
+
if (
|
|
66
|
+
helpTopics &&
|
|
67
|
+
JSON.stringify(helpTopics) !== JSON.stringify(valuesForHelpTopicContext.helpTopics)
|
|
68
|
+
) {
|
|
69
|
+
valuesForHelpTopicContext.setHelpTopics(helpTopics);
|
|
70
|
+
}
|
|
71
|
+
}, [helpTopics, valuesForHelpTopicContext]);
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<HelpTopicContext.Provider value={valuesForHelpTopicContext}>
|
|
75
|
+
<HelpTopicDrawer {...props}>{children}</HelpTopicDrawer>
|
|
76
|
+
</HelpTopicContext.Provider>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export interface HelpTopicDrawerProps extends React.HTMLProps<HTMLDivElement> {
|
|
81
|
+
helpTopics?: HelpTopic[];
|
|
82
|
+
children?: React.ReactNode;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const HelpTopicDrawer: React.FC<HelpTopicDrawerProps> = ({ children, ...props }) => {
|
|
86
|
+
const { activeHelpTopic, filteredHelpTopics, setActiveHelpTopicByName } =
|
|
87
|
+
React.useContext<HelpTopicContextValues>(HelpTopicContext);
|
|
88
|
+
|
|
89
|
+
const onClose = () => {
|
|
90
|
+
setActiveHelpTopicByName('');
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const panelContent = (
|
|
94
|
+
<HelpTopicPanelContent
|
|
95
|
+
activeHelpTopic={activeHelpTopic}
|
|
96
|
+
filteredHelpTopics={filteredHelpTopics}
|
|
97
|
+
onClose={onClose}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<>
|
|
103
|
+
<Drawer isExpanded={!!activeHelpTopic} isInline {...props}>
|
|
104
|
+
{children ? (
|
|
105
|
+
<DrawerContent panelContent={panelContent}>
|
|
106
|
+
<DrawerContentBody className="pfext-quick-start-drawer__body">
|
|
107
|
+
{children}
|
|
108
|
+
</DrawerContentBody>
|
|
109
|
+
</DrawerContent>
|
|
110
|
+
) : (
|
|
111
|
+
<div className="pf-v5-c-drawer__main">{panelContent}</div>
|
|
112
|
+
)}
|
|
113
|
+
</Drawer>
|
|
114
|
+
</>
|
|
115
|
+
);
|
|
116
|
+
};
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Divider,
|
|
5
|
+
DrawerActions,
|
|
6
|
+
DrawerCloseButton,
|
|
7
|
+
DrawerHead,
|
|
8
|
+
DrawerPanelBody,
|
|
9
|
+
DrawerPanelContent,
|
|
10
|
+
MenuToggle,
|
|
11
|
+
Select,
|
|
12
|
+
SelectList,
|
|
13
|
+
SelectOption,
|
|
14
|
+
Stack,
|
|
15
|
+
StackItem,
|
|
16
|
+
Title,
|
|
17
|
+
} from '@patternfly/react-core';
|
|
18
|
+
|
|
19
|
+
import QuickStartMarkdownView from './QuickStartMarkdownView';
|
|
20
|
+
import { HelpTopic } from './utils/help-topic-types';
|
|
21
|
+
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
22
|
+
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
23
|
+
|
|
24
|
+
import './QuickStartPanelContent.scss';
|
|
25
|
+
import { HelpTopicContext, HelpTopicContextValues } from './utils/help-topic-context';
|
|
26
|
+
|
|
27
|
+
interface HelpTopicPanelContentProps {
|
|
28
|
+
activeHelpTopic: HelpTopic;
|
|
29
|
+
filteredHelpTopics?: HelpTopic[];
|
|
30
|
+
isResizable?: boolean;
|
|
31
|
+
onClose: () => void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const HelpTopicPanelContent: React.FC<HelpTopicPanelContentProps> = ({
|
|
35
|
+
activeHelpTopic = null,
|
|
36
|
+
filteredHelpTopics = [],
|
|
37
|
+
isResizable = true,
|
|
38
|
+
onClose,
|
|
39
|
+
...props
|
|
40
|
+
}) => {
|
|
41
|
+
const { setActiveHelpTopicByName } = React.useContext<HelpTopicContextValues>(HelpTopicContext);
|
|
42
|
+
|
|
43
|
+
const [isHelpTopicMenuOpen, setIsHelpTopicMenuOpen] = React.useState(false);
|
|
44
|
+
|
|
45
|
+
const toggleHelpTopicMenu = () => {
|
|
46
|
+
setIsHelpTopicMenuOpen(!isHelpTopicMenuOpen);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const onSelectHelpTopic = (
|
|
50
|
+
_event?: React.MouseEvent<Element, MouseEvent>,
|
|
51
|
+
value?: string | number,
|
|
52
|
+
) => {
|
|
53
|
+
const topicName = value;
|
|
54
|
+
setActiveHelpTopicByName(topicName.toString());
|
|
55
|
+
toggleHelpTopicMenu();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const helpTopicOptions =
|
|
59
|
+
filteredHelpTopics.length > 1 &&
|
|
60
|
+
filteredHelpTopics.map((topic) => (
|
|
61
|
+
<SelectOption key={topic.name} value={topic.name}>
|
|
62
|
+
{topic.title}
|
|
63
|
+
</SelectOption>
|
|
64
|
+
));
|
|
65
|
+
|
|
66
|
+
const paddingContainer = (children) => <div style={{ padding: '24px' }}>{children}</div>;
|
|
67
|
+
|
|
68
|
+
const panelBodyItems = (
|
|
69
|
+
<>
|
|
70
|
+
{paddingContainer(<QuickStartMarkdownView content={activeHelpTopic?.content} />)}
|
|
71
|
+
{!!activeHelpTopic?.links?.length && <Divider />}
|
|
72
|
+
{paddingContainer(
|
|
73
|
+
<Stack hasGutter>
|
|
74
|
+
{activeHelpTopic?.links?.map(({ href, text, newTab, isExternal }, index) => (
|
|
75
|
+
<StackItem key={index}>
|
|
76
|
+
<Button
|
|
77
|
+
component="a"
|
|
78
|
+
href={href}
|
|
79
|
+
target={newTab ? '_blank' : ''}
|
|
80
|
+
rel="noopener noreferrer"
|
|
81
|
+
variant="link"
|
|
82
|
+
aria-label={`Open documentation in new window`}
|
|
83
|
+
isInline
|
|
84
|
+
icon={isExternal ? <ExternalLinkAltIcon /> : null}
|
|
85
|
+
iconPosition="right"
|
|
86
|
+
style={{ fontSize: 'inherit' }}
|
|
87
|
+
>
|
|
88
|
+
{text || href}
|
|
89
|
+
</Button>
|
|
90
|
+
</StackItem>
|
|
91
|
+
))}
|
|
92
|
+
</Stack>,
|
|
93
|
+
)}
|
|
94
|
+
</>
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
const content = (
|
|
98
|
+
<DrawerPanelContent isResizable={isResizable} className="pfext-quick-start__base" {...props}>
|
|
99
|
+
<div>
|
|
100
|
+
<DrawerHead>
|
|
101
|
+
<div className="pfext-quick-start-panel-content__title">
|
|
102
|
+
{helpTopicOptions && (
|
|
103
|
+
<Select
|
|
104
|
+
isPlain
|
|
105
|
+
id="help-topics-select"
|
|
106
|
+
selected={activeHelpTopic}
|
|
107
|
+
isOpen={isHelpTopicMenuOpen}
|
|
108
|
+
onSelect={onSelectHelpTopic}
|
|
109
|
+
onOpenChange={(isOpen: boolean) => setIsHelpTopicMenuOpen(isOpen)}
|
|
110
|
+
toggle={(toggleRef) => (
|
|
111
|
+
<MenuToggle
|
|
112
|
+
isFullWidth
|
|
113
|
+
ref={toggleRef}
|
|
114
|
+
icon={<BarsIcon />}
|
|
115
|
+
onClick={toggleHelpTopicMenu}
|
|
116
|
+
isExpanded={isHelpTopicMenuOpen}
|
|
117
|
+
>
|
|
118
|
+
{activeHelpTopic?.title}
|
|
119
|
+
</MenuToggle>
|
|
120
|
+
)}
|
|
121
|
+
>
|
|
122
|
+
<SelectList>{helpTopicOptions}</SelectList>
|
|
123
|
+
</Select>
|
|
124
|
+
)}
|
|
125
|
+
|
|
126
|
+
<Title
|
|
127
|
+
headingLevel="h1"
|
|
128
|
+
size="xl"
|
|
129
|
+
className="pfext-quick-start-panel-content__name"
|
|
130
|
+
style={{ marginRight: 'var(--pf-v5-global--spacer--md)' }}
|
|
131
|
+
>
|
|
132
|
+
{activeHelpTopic?.title}
|
|
133
|
+
</Title>
|
|
134
|
+
</div>
|
|
135
|
+
{
|
|
136
|
+
<DrawerActions>
|
|
137
|
+
<DrawerCloseButton
|
|
138
|
+
onClick={onClose}
|
|
139
|
+
className="pfext-quick-start-panel-content__close-button"
|
|
140
|
+
data-testid="qs-drawer-close"
|
|
141
|
+
/>
|
|
142
|
+
</DrawerActions>
|
|
143
|
+
}
|
|
144
|
+
</DrawerHead>
|
|
145
|
+
<Divider />
|
|
146
|
+
<DrawerPanelBody
|
|
147
|
+
hasNoPadding
|
|
148
|
+
className="pfext-quick-start-panel-content__body"
|
|
149
|
+
data-test="content"
|
|
150
|
+
>
|
|
151
|
+
{panelBodyItems}
|
|
152
|
+
</DrawerPanelBody>
|
|
153
|
+
</div>
|
|
154
|
+
</DrawerPanelContent>
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
return content;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export default HelpTopicPanelContent;
|