@patternfly/react-core 4.221.6 → 4.221.9

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.
Files changed (33) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/esm/components/Label/Label.d.ts +1 -1
  3. package/dist/esm/components/Label/Label.d.ts.map +1 -1
  4. package/dist/esm/components/Label/Label.js +1 -0
  5. package/dist/esm/components/Label/Label.js.map +1 -1
  6. package/dist/js/components/Label/Label.d.ts +1 -1
  7. package/dist/js/components/Label/Label.d.ts.map +1 -1
  8. package/dist/js/components/Label/Label.js +1 -0
  9. package/dist/js/components/Label/Label.js.map +1 -1
  10. package/dist/umd/react-core.js +1 -0
  11. package/dist/umd/react-core.min.js +1 -1
  12. package/package.json +5 -5
  13. package/src/components/EmptyState/examples/EmptyState.md +7 -193
  14. package/src/components/EmptyState/examples/EmptyStateBasic.tsx +32 -0
  15. package/src/components/EmptyState/examples/EmptyStateExtraLarge.tsx +33 -0
  16. package/src/components/EmptyState/examples/EmptyStateExtraSmall.tsx +29 -0
  17. package/src/components/EmptyState/examples/EmptyStateLarge.tsx +33 -0
  18. package/src/components/EmptyState/examples/EmptyStateNoMatchFound.tsx +16 -0
  19. package/src/components/EmptyState/examples/EmptyStateSmall.tsx +33 -0
  20. package/src/components/EmptyState/examples/EmptyStateSpinner.tsx +11 -0
  21. package/src/components/HelperText/examples/HelperText.md +6 -153
  22. package/src/components/HelperText/examples/HelperTextDynamic.tsx +41 -0
  23. package/src/components/HelperText/examples/HelperTextDynamicList.tsx +16 -0
  24. package/src/components/HelperText/examples/HelperTextMultipleStatic.tsx +10 -0
  25. package/src/components/HelperText/examples/HelperTextStatic.tsx +22 -0
  26. package/src/components/HelperText/examples/HelperTextStaticWithCustomIcon.tsx +35 -0
  27. package/src/components/HelperText/examples/HelperTextStaticWithDefaultIcon.tsx +30 -0
  28. package/src/components/Hint/examples/Hint.md +2 -167
  29. package/src/components/Hint/examples/HintBasicWithTitle.tsx +65 -0
  30. package/src/components/Hint/examples/HintBasicWithoutTitle.tsx +74 -0
  31. package/src/components/Label/Label.tsx +2 -1
  32. package/src/components/Label/examples/Label.md +44 -0
  33. package/src/components/Tabs/examples/Tabs.md +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.221.6",
3
+ "version": "4.221.9",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -34,9 +34,9 @@
34
34
  "generate": "node scripts/copyStyles.js"
35
35
  },
36
36
  "dependencies": {
37
- "@patternfly/react-icons": "^4.72.6",
38
- "@patternfly/react-styles": "^4.71.6",
39
- "@patternfly/react-tokens": "^4.73.6",
37
+ "@patternfly/react-icons": "^4.72.9",
38
+ "@patternfly/react-styles": "^4.71.9",
39
+ "@patternfly/react-tokens": "^4.73.9",
40
40
  "focus-trap": "6.9.2",
41
41
  "react-dropzone": "9.0.0",
42
42
  "tippy.js": "5.1.2",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.8.0 || ^17.0.0",
61
61
  "react-dom": "^16.8.0 || ^17.0.0"
62
62
  },
63
- "gitHead": "f8533a8cf5b7ffa149f5fc2d54fd02731ea8bfa8"
63
+ "gitHead": "caf3cacb7a188572da906aa223edb8e6003493c6"
64
64
  }
@@ -9,222 +9,36 @@ import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
9
9
 
10
10
  ## Examples
11
11
  ### Basic
12
- ```js
13
- import React from 'react';
14
- import {
15
- Title,
16
- Button,
17
- EmptyState,
18
- EmptyStateIcon,
19
- EmptyStateBody,
20
- EmptyStateSecondaryActions
21
- } from '@patternfly/react-core';
22
- import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
23
12
 
24
- <EmptyState>
25
- <EmptyStateIcon icon={CubesIcon} />
26
- <Title headingLevel="h4" size="lg">
27
- Empty state
28
- </Title>
29
- <EmptyStateBody>
30
- This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
31
- enough to meet a variety of needs.
32
- </EmptyStateBody>
33
- <Button variant="primary">Primary action</Button>
34
- <EmptyStateSecondaryActions>
35
- <Button variant="link">Multiple</Button>
36
- <Button variant="link">Action Buttons</Button>
37
- <Button variant="link">Can</Button>
38
- <Button variant="link">Go here</Button>
39
- <Button variant="link">In the secondary</Button>
40
- <Button variant="link">Action area</Button>
41
- </EmptyStateSecondaryActions>
42
- </EmptyState>
13
+ ```ts file="EmptyStateBasic.tsx"
43
14
  ```
44
15
 
45
16
  ### Extra small
46
- ```js
47
- import React from 'react';
48
- import {
49
- Title,
50
- Button,
51
- EmptyState,
52
- EmptyStateVariant,
53
- EmptyStateBody,
54
- EmptyStateSecondaryActions
55
- } from '@patternfly/react-core';
56
17
 
57
- <EmptyState variant={EmptyStateVariant.xs}>
58
- <Title headingLevel="h4" size="md">
59
- Empty state
60
- </Title>
61
- <EmptyStateBody>
62
- This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
63
- enough to meet a variety of needs.
64
- </EmptyStateBody>
65
- <EmptyStateSecondaryActions>
66
- <Button variant="link">Multiple</Button>
67
- <Button variant="link">Action Buttons</Button>
68
- <Button variant="link">Can</Button>
69
- <Button variant="link">Go here</Button>
70
- <Button variant="link">In the secondary</Button>
71
- <Button variant="link">Action area</Button>
72
- </EmptyStateSecondaryActions>
73
- </EmptyState>
18
+ ```ts file="EmptyStateExtraSmall.tsx"
74
19
  ```
75
20
 
76
21
  ### Small
77
- ```js
78
- import React from 'react';
79
- import {
80
- Title,
81
- Button,
82
- EmptyState,
83
- EmptyStateVariant,
84
- EmptyStateIcon,
85
- EmptyStateBody,
86
- EmptyStateSecondaryActions
87
- } from '@patternfly/react-core';
88
- import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
89
22
 
90
- <EmptyState variant={EmptyStateVariant.small}>
91
- <EmptyStateIcon icon={CubesIcon} />
92
- <Title headingLevel="h4" size="lg">
93
- Empty state
94
- </Title>
95
- <EmptyStateBody>
96
- This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
97
- enough to meet a variety of needs.
98
- </EmptyStateBody>
99
- <Button variant="primary">Primary action</Button>
100
- <EmptyStateSecondaryActions>
101
- <Button variant="link">Multiple</Button>
102
- <Button variant="link">Action Buttons</Button>
103
- <Button variant="link">Can</Button>
104
- <Button variant="link">Go here</Button>
105
- <Button variant="link">In the secondary</Button>
106
- <Button variant="link">Action area</Button>
107
- </EmptyStateSecondaryActions>
108
- </EmptyState>
23
+ ```ts file="EmptyStateSmall.tsx"
109
24
  ```
110
25
 
111
26
  ### Large
112
- ```js
113
- import React from 'react';
114
- import {
115
- Title,
116
- Button,
117
- EmptyState,
118
- EmptyStateVariant,
119
- EmptyStateIcon,
120
- EmptyStateBody,
121
- EmptyStateSecondaryActions
122
- } from '@patternfly/react-core';
123
- import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
124
27
 
125
- <EmptyState variant={EmptyStateVariant.large}>
126
- <EmptyStateIcon icon={CubesIcon} />
127
- <Title headingLevel="h4" size="lg">
128
- Empty state
129
- </Title>
130
- <EmptyStateBody>
131
- This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
132
- enough to meet a variety of needs.
133
- </EmptyStateBody>
134
- <Button variant="primary">Primary action</Button>
135
- <EmptyStateSecondaryActions>
136
- <Button variant="link">Multiple</Button>
137
- <Button variant="link">Action Buttons</Button>
138
- <Button variant="link">Can</Button>
139
- <Button variant="link">Go here</Button>
140
- <Button variant="link">In the secondary</Button>
141
- <Button variant="link">Action area</Button>
142
- </EmptyStateSecondaryActions>
143
- </EmptyState>
28
+ ```ts file="EmptyStateLarge.tsx"
144
29
  ```
145
30
 
146
31
  ### Extra large
147
- ```js
148
- import React from 'react';
149
- import {
150
- Title,
151
- Button,
152
- EmptyState,
153
- EmptyStateVariant,
154
- EmptyStateIcon,
155
- EmptyStateBody,
156
- EmptyStateSecondaryActions
157
- } from '@patternfly/react-core';
158
- import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
159
32
 
160
- <EmptyState variant={EmptyStateVariant.xl}>
161
- <EmptyStateIcon icon={CubesIcon} />
162
- <Title headingLevel="h5" size="4xl">
163
- Empty state
164
- </Title>
165
- <EmptyStateBody>
166
- This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
167
- enough to meet a variety of needs.
168
- </EmptyStateBody>
169
- <Button variant="primary">Primary action</Button>
170
- <EmptyStateSecondaryActions>
171
- <Button variant="link">Multiple</Button>
172
- <Button variant="link">Action Buttons</Button>
173
- <Button variant="link">Can</Button>
174
- <Button variant="link">Go here</Button>
175
- <Button variant="link">In the secondary</Button>
176
- <Button variant="link">Action area</Button>
177
- </EmptyStateSecondaryActions>
178
- </EmptyState>
33
+ ```ts file="EmptyStateExtraLarge.tsx"
179
34
  ```
180
35
 
181
36
  ### Spinner
182
- ```js
183
- import React from 'react';
184
- import {
185
- Title,
186
- EmptyState,
187
- EmptyStateIcon,
188
- Spinner
189
- } from '@patternfly/react-core';
190
37
 
191
-
192
- EmptyStateSpinner = () => {
193
- return (
194
- <EmptyState>
195
- <EmptyStateIcon variant="container" component={Spinner} />
196
- <Title size="lg" headingLevel="h4">
197
- Loading
198
- </Title>
199
- </EmptyState>
200
- );
201
- }
38
+ ```ts file="EmptyStateSpinner.tsx"
202
39
  ```
203
40
 
204
41
  ### No match found
205
- ```js
206
- import React from 'react';
207
- import {
208
- Title,
209
- Button,
210
- EmptyState,
211
- EmptyStatePrimary,
212
- EmptyStateIcon,
213
- EmptyStateBody
214
- } from '@patternfly/react-core';
215
- import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
216
-
217
42
 
218
- <EmptyState>
219
- <EmptyStateIcon icon={SearchIcon} />
220
- <Title size="lg" headingLevel="h4">
221
- No results found
222
- </Title>
223
- <EmptyStateBody>
224
- No results match the filter criteria. Clear all filters and try again.
225
- </EmptyStateBody>
226
- <EmptyStatePrimary>
227
- <Button variant="link">Clear all filters</Button>
228
- </EmptyStatePrimary>
229
- </EmptyState>
43
+ ```ts file="EmptyStateNoMatchFound.tsx"
230
44
  ```
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import {
3
+ Title,
4
+ Button,
5
+ EmptyState,
6
+ EmptyStateIcon,
7
+ EmptyStateBody,
8
+ EmptyStateSecondaryActions
9
+ } from '@patternfly/react-core';
10
+ import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
11
+
12
+ export const EmptyStateBasic: React.FunctionComponent = () => (
13
+ <EmptyState>
14
+ <EmptyStateIcon icon={CubesIcon} />
15
+ <Title headingLevel="h4" size="lg">
16
+ Empty state
17
+ </Title>
18
+ <EmptyStateBody>
19
+ This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
20
+ enough to meet a variety of needs.
21
+ </EmptyStateBody>
22
+ <Button variant="primary">Primary action</Button>
23
+ <EmptyStateSecondaryActions>
24
+ <Button variant="link">Multiple</Button>
25
+ <Button variant="link">Action Buttons</Button>
26
+ <Button variant="link">Can</Button>
27
+ <Button variant="link">Go here</Button>
28
+ <Button variant="link">In the secondary</Button>
29
+ <Button variant="link">Action area</Button>
30
+ </EmptyStateSecondaryActions>
31
+ </EmptyState>
32
+ );
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import {
3
+ Title,
4
+ Button,
5
+ EmptyState,
6
+ EmptyStateVariant,
7
+ EmptyStateIcon,
8
+ EmptyStateBody,
9
+ EmptyStateSecondaryActions
10
+ } from '@patternfly/react-core';
11
+ import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
12
+
13
+ export const EmptyStateExtraLarge: React.FunctionComponent = () => (
14
+ <EmptyState variant={EmptyStateVariant.xl}>
15
+ <EmptyStateIcon icon={CubesIcon} />
16
+ <Title headingLevel="h5" size="4xl">
17
+ Empty state
18
+ </Title>
19
+ <EmptyStateBody>
20
+ This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
21
+ enough to meet a variety of needs.
22
+ </EmptyStateBody>
23
+ <Button variant="primary">Primary action</Button>
24
+ <EmptyStateSecondaryActions>
25
+ <Button variant="link">Multiple</Button>
26
+ <Button variant="link">Action Buttons</Button>
27
+ <Button variant="link">Can</Button>
28
+ <Button variant="link">Go here</Button>
29
+ <Button variant="link">In the secondary</Button>
30
+ <Button variant="link">Action area</Button>
31
+ </EmptyStateSecondaryActions>
32
+ </EmptyState>
33
+ );
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+ import {
3
+ Title,
4
+ Button,
5
+ EmptyState,
6
+ EmptyStateVariant,
7
+ EmptyStateBody,
8
+ EmptyStateSecondaryActions
9
+ } from '@patternfly/react-core';
10
+
11
+ export const EmptyStateExtraSmall: React.FunctionComponent = () => (
12
+ <EmptyState variant={EmptyStateVariant.xs}>
13
+ <Title headingLevel="h4" size="md">
14
+ Empty state
15
+ </Title>
16
+ <EmptyStateBody>
17
+ This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
18
+ enough to meet a variety of needs.
19
+ </EmptyStateBody>
20
+ <EmptyStateSecondaryActions>
21
+ <Button variant="link">Multiple</Button>
22
+ <Button variant="link">Action Buttons</Button>
23
+ <Button variant="link">Can</Button>
24
+ <Button variant="link">Go here</Button>
25
+ <Button variant="link">In the secondary</Button>
26
+ <Button variant="link">Action area</Button>
27
+ </EmptyStateSecondaryActions>
28
+ </EmptyState>
29
+ );
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import {
3
+ Title,
4
+ Button,
5
+ EmptyState,
6
+ EmptyStateVariant,
7
+ EmptyStateIcon,
8
+ EmptyStateBody,
9
+ EmptyStateSecondaryActions
10
+ } from '@patternfly/react-core';
11
+ import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
12
+
13
+ export const EmptyStateLarge: React.FunctionComponent = () => (
14
+ <EmptyState variant={EmptyStateVariant.large}>
15
+ <EmptyStateIcon icon={CubesIcon} />
16
+ <Title headingLevel="h4" size="lg">
17
+ Empty state
18
+ </Title>
19
+ <EmptyStateBody>
20
+ This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
21
+ enough to meet a variety of needs.
22
+ </EmptyStateBody>
23
+ <Button variant="primary">Primary action</Button>
24
+ <EmptyStateSecondaryActions>
25
+ <Button variant="link">Multiple</Button>
26
+ <Button variant="link">Action Buttons</Button>
27
+ <Button variant="link">Can</Button>
28
+ <Button variant="link">Go here</Button>
29
+ <Button variant="link">In the secondary</Button>
30
+ <Button variant="link">Action area</Button>
31
+ </EmptyStateSecondaryActions>
32
+ </EmptyState>
33
+ );
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { Title, Button, EmptyState, EmptyStatePrimary, EmptyStateIcon, EmptyStateBody } from '@patternfly/react-core';
3
+ import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
4
+
5
+ export const EmptyStateNoMatchFound: React.FunctionComponent = () => (
6
+ <EmptyState>
7
+ <EmptyStateIcon icon={SearchIcon} />
8
+ <Title size="lg" headingLevel="h4">
9
+ No results found
10
+ </Title>
11
+ <EmptyStateBody>No results match the filter criteria. Clear all filters and try again.</EmptyStateBody>
12
+ <EmptyStatePrimary>
13
+ <Button variant="link">Clear all filters</Button>
14
+ </EmptyStatePrimary>
15
+ </EmptyState>
16
+ );
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import {
3
+ Title,
4
+ Button,
5
+ EmptyState,
6
+ EmptyStateVariant,
7
+ EmptyStateIcon,
8
+ EmptyStateBody,
9
+ EmptyStateSecondaryActions
10
+ } from '@patternfly/react-core';
11
+ import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
12
+
13
+ export const EmptyStateSmall: React.FunctionComponent = () => (
14
+ <EmptyState variant={EmptyStateVariant.small}>
15
+ <EmptyStateIcon icon={CubesIcon} />
16
+ <Title headingLevel="h4" size="lg">
17
+ Empty state
18
+ </Title>
19
+ <EmptyStateBody>
20
+ This represents an the empty state pattern in Patternfly 4. Hopefully it's simple enough to use but flexible
21
+ enough to meet a variety of needs.
22
+ </EmptyStateBody>
23
+ <Button variant="primary">Primary action</Button>
24
+ <EmptyStateSecondaryActions>
25
+ <Button variant="link">Multiple</Button>
26
+ <Button variant="link">Action Buttons</Button>
27
+ <Button variant="link">Can</Button>
28
+ <Button variant="link">Go here</Button>
29
+ <Button variant="link">In the secondary</Button>
30
+ <Button variant="link">Action area</Button>
31
+ </EmptyStateSecondaryActions>
32
+ </EmptyState>
33
+ );
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { Title, EmptyState, EmptyStateIcon, Spinner } from '@patternfly/react-core';
3
+
4
+ export const EmptyStateSpinner: React.FunctionComponent = () => (
5
+ <EmptyState>
6
+ <EmptyStateIcon variant="container" component={Spinner} />
7
+ <Title size="lg" headingLevel="h4">
8
+ Loading
9
+ </Title>
10
+ </EmptyState>
11
+ );
@@ -15,177 +15,30 @@ import ExclamationIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-
15
15
 
16
16
  ### Static
17
17
 
18
- ```js
19
- import React from 'react';
20
- import { HelperText, HelperTextItem } from '@patternfly/react-core';
21
-
22
- <React.Fragment>
23
- <HelperText>
24
- <HelperTextItem>This is default helper text</HelperTextItem>
25
- </HelperText>
26
- <HelperText>
27
- <HelperTextItem variant="indeterminate">This is indeterminate helper text</HelperTextItem>
28
- </HelperText>
29
- <HelperText>
30
- <HelperTextItem variant="warning">This is warning helper text</HelperTextItem>
31
- </HelperText>
32
- <HelperText>
33
- <HelperTextItem variant="success">This is success helper text</HelperTextItem>
34
- </HelperText>
35
- <HelperText>
36
- <HelperTextItem variant="error">This is error helper text</HelperTextItem>
37
- </HelperText>
38
- </React.Fragment>;
18
+ ```ts file="HelperTextStatic.tsx"
39
19
  ```
40
20
 
41
21
  ### Static with default icons
42
22
 
43
- ```js
44
- import React from 'react';
45
- import { HelperText, HelperTextItem } from '@patternfly/react-core';
46
- import InfoIcon from '@patternfly/react-icons/dist/esm/icons/info-icon';
47
- import QuestionIcon from '@patternfly/react-icons/dist/esm/icons/question-icon';
48
- import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
49
- import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
50
- import ExclamationCircleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-circle-icon';
51
-
52
- <React.Fragment>
53
- <HelperText>
54
- <HelperTextItem hasIcon>This is default helper text</HelperTextItem>
55
- </HelperText>
56
- <HelperText>
57
- <HelperTextItem variant="indeterminate" hasIcon>
58
- This is indeterminate helper text
59
- </HelperTextItem>
60
- </HelperText>
61
- <HelperText>
62
- <HelperTextItem variant="warning" hasIcon>
63
- This is warning helper text
64
- </HelperTextItem>
65
- </HelperText>
66
- <HelperText>
67
- <HelperTextItem variant="success" hasIcon>
68
- This is success helper text
69
- </HelperTextItem>
70
- </HelperText>
71
- <HelperText>
72
- <HelperTextItem variant="error" hasIcon>
73
- This is error helper text
74
- </HelperTextItem>
75
- </HelperText>
76
- </React.Fragment>;
23
+ ```ts file="HelperTextStaticWithDefaultIcon.tsx"
77
24
  ```
78
25
 
79
26
  ### Static with custom icons
80
27
 
81
- ```js
82
- import React from 'react';
83
- import { HelperText, HelperTextItem } from '@patternfly/react-core';
84
- import InfoIcon from '@patternfly/react-icons/dist/esm/icons/info-icon';
85
- import QuestionIcon from '@patternfly/react-icons/dist/esm/icons/question-icon';
86
- import ExclamationIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-icon';
87
- import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
88
- import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
89
-
90
- <React.Fragment>
91
- <HelperText>
92
- <HelperTextItem icon={<InfoIcon />}>This is default helper text</HelperTextItem>
93
- </HelperText>
94
- <HelperText>
95
- <HelperTextItem variant="indeterminate" icon={<QuestionIcon />}>
96
- This is indeterminate helper text
97
- </HelperTextItem>
98
- </HelperText>
99
- <HelperText>
100
- <HelperTextItem variant="warning" icon={<ExclamationIcon />}>
101
- This is warning helper text
102
- </HelperTextItem>
103
- </HelperText>
104
- <HelperText>
105
- <HelperTextItem variant="success" icon={<CheckIcon />}>
106
- This is success helper text
107
- </HelperTextItem>
108
- </HelperText>
109
- <HelperText>
110
- <HelperTextItem variant="error" icon={<TimesIcon />}>
111
- This is error helper text
112
- </HelperTextItem>
113
- </HelperText>
114
- </React.Fragment>;
28
+ ```ts file="HelperTextStaticWithCustomIcon.tsx"
115
29
  ```
116
30
 
117
31
  ### Multiple static
118
32
 
119
- ```js
120
- import React from 'react';
121
- import { HelperText, HelperTextItem } from '@patternfly/react-core';
122
-
123
- <HelperText>
124
- <HelperTextItem>This is default helper text</HelperTextItem>
125
- <HelperTextItem>This is another default helper text in the same block</HelperTextItem>
126
- <HelperTextItem>And this is more default text in the same block</HelperTextItem>
127
- </HelperText>;
33
+ ```ts file="HelperTextMultipleStatic.tsx"
128
34
  ```
129
35
 
130
36
  ### Dynamic
131
37
 
132
- ```js
133
- import React from 'react';
134
- import { HelperText, HelperTextItem } from '@patternfly/react-core';
135
- import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
136
-
137
- <React.Fragment>
138
- <HelperText>
139
- <HelperTextItem isDynamic>This is default helper text</HelperTextItem>
140
- </HelperText>
141
- <HelperText>
142
- <HelperTextItem isDynamic variant="indeterminate">
143
- This is indeterminate helper text
144
- </HelperTextItem>
145
- </HelperText>
146
- <HelperText>
147
- <HelperTextItem isDynamic variant="warning">
148
- This is warning helper text
149
- </HelperTextItem>
150
- </HelperText>
151
- <HelperText>
152
- <HelperTextItem isDynamic variant="success">
153
- This is success helper text
154
- </HelperTextItem>
155
- </HelperText>
156
- <HelperText>
157
- <HelperTextItem isDynamic variant="error">
158
- This is error helper text
159
- </HelperTextItem>
160
- </HelperText>
161
- <HelperText>
162
- <HelperTextItem isDynamic variant="error" icon={<TimesIcon />}>
163
- This is error helper text with a custom icon
164
- </HelperTextItem>
165
- </HelperText>
166
- <HelperText>
167
- <HelperTextItem isDynamic variant="error" hasIcon={false}>
168
- This is error helper text with no icon
169
- </HelperTextItem>
170
- </HelperText>
171
- </React.Fragment>;
38
+ ```ts file="HelperTextDynamic.tsx"
172
39
  ```
173
40
 
174
41
  ### Dynamic list
175
42
 
176
- ```js
177
- import React from 'react';
178
- import { HelperText, HelperTextItem } from '@patternfly/react-core';
179
-
180
- <HelperText component="ul">
181
- <HelperTextItem isDynamic variant="success" component="li">
182
- Must be at least 14 characters
183
- </HelperTextItem>
184
- <HelperTextItem isDynamic variant="error" component="li">
185
- Cannot contain any variation of the word "redhat"
186
- </HelperTextItem>
187
- <HelperTextItem isDynamic variant="success" component="li">
188
- Must include at least 3 of the following: lowercase letter, uppercase letters, numbers, symbols
189
- </HelperTextItem>
190
- </HelperText>;
43
+ ```ts file="HelperTextDynamicList.tsx"
191
44
  ```
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { HelperText, HelperTextItem } from '@patternfly/react-core';
3
+ import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
4
+
5
+ export const HelperTextDynamic: React.FunctionComponent = () => (
6
+ <React.Fragment>
7
+ <HelperText>
8
+ <HelperTextItem isDynamic>This is default helper text</HelperTextItem>
9
+ </HelperText>
10
+ <HelperText>
11
+ <HelperTextItem isDynamic variant="indeterminate">
12
+ This is indeterminate helper text
13
+ </HelperTextItem>
14
+ </HelperText>
15
+ <HelperText>
16
+ <HelperTextItem isDynamic variant="warning">
17
+ This is warning helper text
18
+ </HelperTextItem>
19
+ </HelperText>
20
+ <HelperText>
21
+ <HelperTextItem isDynamic variant="success">
22
+ This is success helper text
23
+ </HelperTextItem>
24
+ </HelperText>
25
+ <HelperText>
26
+ <HelperTextItem isDynamic variant="error">
27
+ This is error helper text
28
+ </HelperTextItem>
29
+ </HelperText>
30
+ <HelperText>
31
+ <HelperTextItem isDynamic variant="error" icon={<TimesIcon />}>
32
+ This is error helper text with a custom icon
33
+ </HelperTextItem>
34
+ </HelperText>
35
+ <HelperText>
36
+ <HelperTextItem isDynamic variant="error" hasIcon={false}>
37
+ This is error helper text with no icon
38
+ </HelperTextItem>
39
+ </HelperText>
40
+ </React.Fragment>
41
+ );