@patternfly/react-core 4.221.5 → 4.221.8

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.
@@ -0,0 +1,74 @@
1
+ import React from 'react';
2
+ import {
3
+ Hint,
4
+ HintBody,
5
+ HintFooter,
6
+ Button,
7
+ Dropdown,
8
+ DropdownItem,
9
+ DropdownSeparator,
10
+ KebabToggle
11
+ } from '@patternfly/react-core';
12
+
13
+ export const HintBasicWithoutTitle: React.FunctionComponent = () => {
14
+ const [isOpen, setIsOpen] = React.useState<boolean>(false);
15
+
16
+ const onToggle = (isOpen: boolean) => {
17
+ setIsOpen(isOpen);
18
+ };
19
+
20
+ const onSelect = () => {
21
+ setIsOpen(!isOpen);
22
+ };
23
+
24
+ const dropdownItems = [
25
+ <DropdownItem key="link">Link</DropdownItem>,
26
+ <DropdownItem key="action" component="button">
27
+ Action
28
+ </DropdownItem>,
29
+ <DropdownItem key="disabled link" isDisabled>
30
+ Disabled Link
31
+ </DropdownItem>,
32
+ <DropdownItem key="disabled action" isDisabled component="button">
33
+ Disabled Action
34
+ </DropdownItem>,
35
+ <DropdownSeparator key="separator" />,
36
+ <DropdownItem key="separated link">Separated Link</DropdownItem>,
37
+ <DropdownItem key="separated action" component="button">
38
+ Separated Action
39
+ </DropdownItem>
40
+ ];
41
+ const actions = (
42
+ <Dropdown
43
+ onSelect={onSelect}
44
+ toggle={<KebabToggle onToggle={onToggle} id="hint-notitle-kebab-toggle" />}
45
+ isOpen={isOpen}
46
+ dropdownItems={dropdownItems}
47
+ position="right"
48
+ isPlain
49
+ />
50
+ );
51
+ return (
52
+ <React.Fragment>
53
+ <Hint>
54
+ <HintBody>
55
+ Welcome to the new documentation experience.
56
+ <Button variant="link" isInline>
57
+ Learn more about the improved features.
58
+ </Button>
59
+ </HintBody>
60
+ </Hint>
61
+ <br />
62
+ <Hint actions={actions}>
63
+ <HintBody>
64
+ Upgrade to Red Hat Smart Management to remediate all your systems across regions and geographies.
65
+ </HintBody>
66
+ <HintFooter>
67
+ <Button variant="link" isInline>
68
+ Try it for 90 days
69
+ </Button>
70
+ </HintFooter>
71
+ </Hint>
72
+ </React.Fragment>
73
+ );
74
+ };
@@ -640,8 +640,8 @@ class InsetTabs extends React.Component {
640
640
  inset={{
641
641
  default: 'insetNone',
642
642
  md: 'insetSm',
643
- xl: 'inset2xl',
644
- '2xl': 'insetLg'
643
+ xl: 'insetLg',
644
+ '2xl': 'inset2xl'
645
645
  }}
646
646
  isBox={isBox}
647
647
  aria-label="Tabs in the inset example"