@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.
- package/CHANGELOG.md +24 -0
- package/dist/umd/react-core.css +107 -107
- package/package.json +5 -5
- package/src/components/EmptyState/examples/EmptyState.md +7 -193
- package/src/components/EmptyState/examples/EmptyStateBasic.tsx +32 -0
- package/src/components/EmptyState/examples/EmptyStateExtraLarge.tsx +33 -0
- package/src/components/EmptyState/examples/EmptyStateExtraSmall.tsx +29 -0
- package/src/components/EmptyState/examples/EmptyStateLarge.tsx +33 -0
- package/src/components/EmptyState/examples/EmptyStateNoMatchFound.tsx +16 -0
- package/src/components/EmptyState/examples/EmptyStateSmall.tsx +33 -0
- package/src/components/EmptyState/examples/EmptyStateSpinner.tsx +11 -0
- package/src/components/HelperText/examples/HelperText.md +6 -153
- package/src/components/HelperText/examples/HelperTextDynamic.tsx +41 -0
- package/src/components/HelperText/examples/HelperTextDynamicList.tsx +16 -0
- package/src/components/HelperText/examples/HelperTextMultipleStatic.tsx +10 -0
- package/src/components/HelperText/examples/HelperTextStatic.tsx +22 -0
- package/src/components/HelperText/examples/HelperTextStaticWithCustomIcon.tsx +35 -0
- package/src/components/HelperText/examples/HelperTextStaticWithDefaultIcon.tsx +30 -0
- package/src/components/Hint/examples/Hint.md +2 -167
- package/src/components/Hint/examples/HintBasicWithTitle.tsx +65 -0
- package/src/components/Hint/examples/HintBasicWithoutTitle.tsx +74 -0
- package/src/components/Tabs/examples/Tabs.md +2 -2
|
@@ -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: '
|
|
644
|
-
'2xl': '
|
|
643
|
+
xl: 'insetLg',
|
|
644
|
+
'2xl': 'inset2xl'
|
|
645
645
|
}}
|
|
646
646
|
isBox={isBox}
|
|
647
647
|
aria-label="Tabs in the inset example"
|