@patternfly/react-core 4.192.0 → 4.192.4

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 (63) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/esm/components/DatePicker/DatePicker.d.ts +2 -0
  3. package/dist/esm/components/DatePicker/DatePicker.d.ts.map +1 -1
  4. package/dist/esm/components/DatePicker/DatePicker.js +7 -3
  5. package/dist/esm/components/DatePicker/DatePicker.js.map +1 -1
  6. package/dist/esm/components/Select/Select.d.ts.map +1 -1
  7. package/dist/esm/components/Select/Select.js +2 -2
  8. package/dist/esm/components/Select/Select.js.map +1 -1
  9. package/dist/esm/components/Select/SelectOption.d.ts +2 -0
  10. package/dist/esm/components/Select/SelectOption.d.ts.map +1 -1
  11. package/dist/esm/components/Select/SelectOption.js +70 -48
  12. package/dist/esm/components/Select/SelectOption.js.map +1 -1
  13. package/dist/js/components/DatePicker/DatePicker.d.ts +2 -0
  14. package/dist/js/components/DatePicker/DatePicker.d.ts.map +1 -1
  15. package/dist/js/components/DatePicker/DatePicker.js +7 -3
  16. package/dist/js/components/DatePicker/DatePicker.js.map +1 -1
  17. package/dist/js/components/Select/Select.d.ts.map +1 -1
  18. package/dist/js/components/Select/Select.js +2 -2
  19. package/dist/js/components/Select/Select.js.map +1 -1
  20. package/dist/js/components/Select/SelectOption.d.ts +2 -0
  21. package/dist/js/components/Select/SelectOption.d.ts.map +1 -1
  22. package/dist/js/components/Select/SelectOption.js +70 -48
  23. package/dist/js/components/Select/SelectOption.js.map +1 -1
  24. package/dist/umd/react-core.js +79 -53
  25. package/dist/umd/react-core.min.js +1 -1
  26. package/index.d.ts +4 -0
  27. package/package.json +5 -5
  28. package/src/components/BackToTop/examples/BackToTop.css +3 -3
  29. package/src/components/BackToTop/examples/BackToTop.md +1 -5
  30. package/src/components/BackToTop/examples/BackToTopBasic.tsx +4 -0
  31. package/src/components/Backdrop/examples/Backdrop.md +3 -12
  32. package/src/components/Backdrop/examples/BackdropBasic.tsx +4 -0
  33. package/src/components/Backdrop/examples/BackdropSpinner.tsx +10 -0
  34. package/src/components/BackgroundImage/examples/BackgroundImage.md +2 -21
  35. package/src/components/BackgroundImage/examples/BackgroundImageBasic.tsx +15 -0
  36. package/src/components/Badge/examples/Badge.md +3 -24
  37. package/src/components/Badge/examples/BadgeRead.tsx +19 -0
  38. package/src/components/Badge/examples/BadgeUnread.tsx +8 -0
  39. package/src/components/Banner/examples/Banner.md +1 -14
  40. package/src/components/Banner/examples/BannerBasic.tsx +16 -0
  41. package/src/components/Brand/examples/Brand.md +3 -5
  42. package/src/components/Brand/examples/BrandBasic.tsx +5 -0
  43. package/src/components/Breadcrumb/examples/Breadcrumb.md +4 -105
  44. package/src/components/Breadcrumb/examples/BreadcrumbBasic.tsx +13 -0
  45. package/src/components/Breadcrumb/examples/BreadcrumbDropdown.tsx +53 -0
  46. package/src/components/Breadcrumb/examples/BreadcrumbWithHeading.tsx +12 -0
  47. package/src/components/Breadcrumb/examples/BreadcrumbWithoutHomeLink.tsx +15 -0
  48. package/src/components/Button/examples/ButtonAriaDisabled.tsx +33 -37
  49. package/src/components/Button/examples/ButtonCallToAction.tsx +8 -6
  50. package/src/components/Button/examples/ButtonDisabled.tsx +33 -37
  51. package/src/components/Button/examples/ButtonInlineSpanLink.tsx +2 -2
  52. package/src/components/Button/examples/ButtonLinks.tsx +6 -6
  53. package/src/components/Button/examples/ButtonProgress.tsx +8 -5
  54. package/src/components/Button/examples/ButtonSmall.tsx +9 -7
  55. package/src/components/Button/examples/ButtonTypes.tsx +4 -6
  56. package/src/components/Button/examples/ButtonVariations.tsx +31 -36
  57. package/src/components/DatePicker/DatePicker.tsx +10 -2
  58. package/src/components/DatePicker/examples/DatePicker.md +4 -1
  59. package/src/components/Select/Select.tsx +2 -1
  60. package/src/components/Select/SelectOption.tsx +188 -133
  61. package/src/demos/Tabs/NestedTabsDemo.js +3 -3
  62. package/src/demos/Tabs.md +4 -0
  63. package/src/demos/examples/Tabs/GrayTabs.tsx +158 -0
@@ -69,6 +69,8 @@ export interface SelectOptionProps extends Omit<React.HTMLProps<HTMLElement>, 't
69
69
  setViewMoreNextIndex?: () => void;
70
70
  /** @hide Flag indicating this is the last option when there is a footer */
71
71
  isLastOptionBeforeFooter?: (index: number) => boolean;
72
+ /** @hide Flag indicating that the the option loading variant is in a grouped select */
73
+ isGrouped?: boolean;
72
74
  }
73
75
 
74
76
  export class SelectOption extends React.Component<SelectOptionProps> {
@@ -182,6 +184,7 @@ export class SelectOption extends React.Component<SelectOptionProps> {
182
184
  setViewMoreNextIndex,
183
185
  // eslint-disable-next-line no-console
184
186
  isLastOptionBeforeFooter,
187
+ isGrouped = false,
185
188
  ...props
186
189
  } = this.props;
187
190
  /* eslint-enable @typescript-eslint/no-unused-vars */
@@ -228,166 +231,218 @@ export class SelectOption extends React.Component<SelectOptionProps> {
228
231
  onClick(event);
229
232
  };
230
233
 
231
- return (
232
- <SelectConsumer>
233
- {({ onSelect, onClose, variant, inputIdPrefix, onFavorite }) => (
234
- <React.Fragment>
235
- {variant !== SelectVariant.checkbox && (
236
- <li
237
- id={generatedId}
238
- role="presentation"
239
- className={css(
240
- isLoading && styles.selectListItem,
241
- !isLoad && !isLoading && styles.selectMenuWrapper,
242
- isFavorite && styles.modifiers.favorite,
243
- isFocused && styles.modifiers.focus,
244
- isLoading && styles.modifiers.loading
245
- )}
246
- ref={this.liRef}
247
- >
248
- {isLoading && children}
249
- {!isLoading && (
250
- <>
251
- <Component
252
- {...props}
253
- className={css(
254
- styles.selectMenuItem,
255
- isLoad && styles.modifiers.load,
256
- isSelected && styles.modifiers.selected,
257
- isDisabled && styles.modifiers.disabled,
258
- description && styles.modifiers.description,
259
- isFavorite !== null && styles.modifiers.link,
260
- className
261
- )}
262
- onClick={(event: any) => {
263
- if (isLoad) {
264
- onViewMoreClick(event);
265
- event.stopPropagation();
266
- } else if (!isDisabled && !isLoading) {
267
- onClick(event);
268
- onSelect(event, value, isPlaceholder);
269
- onClose();
270
- }
271
- }}
272
- role="option"
273
- aria-selected={isSelected || null}
274
- ref={this.ref}
275
- onKeyDown={(event: React.KeyboardEvent) => {
276
- this.onKeyDown(event, 0);
277
- }}
278
- type="button"
279
- >
280
- {description && (
281
- <React.Fragment>
282
- <span className={css(styles.selectMenuItemMain)}>
283
- {itemDisplay}
284
- {isSelected && (
285
- <span className={css(styles.selectMenuItemIcon)}>
286
- <CheckIcon aria-hidden />
287
- </span>
288
- )}
289
- </span>
290
- <span className={css(styles.selectMenuItemDescription)}>{description}</span>
291
- </React.Fragment>
292
- )}
293
- {!description && (
294
- <React.Fragment>
295
- {itemDisplay}
296
- {isSelected && (
297
- <span className={css(styles.selectMenuItemIcon)}>
298
- <CheckIcon aria-hidden />
299
- </span>
300
- )}
301
- </React.Fragment>
302
- )}
303
- </Component>
304
- {isFavorite !== null && id && favoriteButton(onFavorite)}
305
- </>
306
- )}
307
- </li>
234
+ const renderOption = (
235
+ onSelect: (
236
+ event: React.MouseEvent<any, MouseEvent> | React.ChangeEvent<HTMLInputElement>,
237
+ value: string | SelectOptionObject,
238
+ isPlaceholder?: boolean
239
+ ) => void,
240
+ onClose: () => void,
241
+ variant: string,
242
+ inputIdPrefix: string,
243
+ onFavorite: (itemId: string, isFavorite: boolean) => void
244
+ ) => {
245
+ if (variant !== SelectVariant.checkbox && isLoading && isGrouped) {
246
+ return (
247
+ <div
248
+ role="presentation"
249
+ className={css(styles.selectListItem, isLoading && styles.modifiers.loading, className)}
250
+ >
251
+ {children}
252
+ </div>
253
+ );
254
+ } else if (variant !== SelectVariant.checkbox && isLoad && isGrouped) {
255
+ return (
256
+ <div>
257
+ <button
258
+ {...props}
259
+ role="presentation"
260
+ className={css(styles.selectMenuItem, styles.modifiers.load, className)}
261
+ onClick={(event: any) => {
262
+ onViewMoreClick(event);
263
+ event.stopPropagation();
264
+ }}
265
+ ref={this.ref}
266
+ type="button"
267
+ >
268
+ {children || value.toString()}
269
+ </button>
270
+ </div>
271
+ );
272
+ } else if (variant !== SelectVariant.checkbox) {
273
+ return (
274
+ <li
275
+ id={generatedId}
276
+ role="presentation"
277
+ className={css(
278
+ isLoading && styles.selectListItem,
279
+ !isLoad && !isLoading && styles.selectMenuWrapper,
280
+ isFavorite && styles.modifiers.favorite,
281
+ isFocused && styles.modifiers.focus,
282
+ isLoading && styles.modifiers.loading
308
283
  )}
309
- {variant === SelectVariant.checkbox && isLoad && (
284
+ ref={this.liRef}
285
+ >
286
+ {isLoading && children}
287
+ {isLoad && !isGrouped && (
310
288
  <button
311
- className={css(
312
- styles.selectMenuItem,
313
- styles.modifiers.load,
314
- isFocused && styles.modifiers.focus,
315
- className
316
- )}
317
- onKeyDown={(event: React.KeyboardEvent) => {
318
- this.onKeyDown(event, 0, undefined, true);
319
- }}
289
+ {...props}
290
+ className={css(styles.selectMenuItem, styles.modifiers.load, className)}
320
291
  onClick={(event: any) => {
321
292
  onViewMoreClick(event);
322
293
  event.stopPropagation();
323
294
  }}
324
295
  ref={this.ref}
296
+ type="button"
325
297
  >
326
- {children || (value && value.toString && value.toString())}
298
+ {itemDisplay}
327
299
  </button>
328
300
  )}
329
- {variant === SelectVariant.checkbox && isLoading && (
330
- <div className={css(styles.selectListItem, isLoading && styles.modifiers.loading, className)}>
331
- {children}
332
- </div>
333
- )}
334
- {variant === SelectVariant.checkbox && !isNoResultsOption && !isLoading && !isLoad && (
335
- <label
336
- {...props}
337
- className={css(
338
- checkStyles.check,
339
- styles.selectMenuItem,
340
- isDisabled && styles.modifiers.disabled,
341
- description && styles.modifiers.description,
342
- className
343
- )}
344
- onKeyDown={(event: React.KeyboardEvent) => {
345
- this.onKeyDown(event, 0, undefined, true);
346
- }}
347
- >
348
- <input
349
- id={inputId || `${inputIdPrefix}-${value.toString()}`}
350
- className={css(checkStyles.checkInput)}
351
- type="checkbox"
352
- onChange={event => {
353
- if (!isDisabled) {
354
- onClick(event);
355
- onSelect(event, value);
356
- }
357
- }}
358
- ref={this.ref}
359
- checked={isChecked || false}
360
- disabled={isDisabled}
361
- />
362
- <span className={css(checkStyles.checkLabel, isDisabled && styles.modifiers.disabled)}>
363
- {itemDisplay}
364
- </span>
365
- {description && <div className={css(checkStyles.checkDescription)}>{description}</div>}
366
- </label>
367
- )}
368
- {variant === SelectVariant.checkbox && isNoResultsOption && !isLoading && !isLoad && (
369
- <div>
301
+ {!isLoading && !isLoad && (
302
+ <>
370
303
  <Component
371
304
  {...props}
372
305
  className={css(
373
306
  styles.selectMenuItem,
307
+ isLoad && styles.modifiers.load,
374
308
  isSelected && styles.modifiers.selected,
375
309
  isDisabled && styles.modifiers.disabled,
310
+ description && styles.modifiers.description,
311
+ isFavorite !== null && styles.modifiers.link,
376
312
  className
377
313
  )}
314
+ onClick={(event: any) => {
315
+ if (!isDisabled) {
316
+ onClick(event);
317
+ onSelect(event, value, isPlaceholder);
318
+ onClose();
319
+ }
320
+ }}
378
321
  role="option"
379
322
  aria-selected={isSelected || null}
380
323
  ref={this.ref}
381
324
  onKeyDown={(event: React.KeyboardEvent) => {
382
- this.onKeyDown(event, 0, undefined, true);
325
+ this.onKeyDown(event, 0);
383
326
  }}
384
327
  type="button"
385
328
  >
386
- {itemDisplay}
329
+ {description && (
330
+ <React.Fragment>
331
+ <span className={css(styles.selectMenuItemMain)}>
332
+ {itemDisplay}
333
+ {isSelected && (
334
+ <span className={css(styles.selectMenuItemIcon)}>
335
+ <CheckIcon aria-hidden />
336
+ </span>
337
+ )}
338
+ </span>
339
+ <span className={css(styles.selectMenuItemDescription)}>{description}</span>
340
+ </React.Fragment>
341
+ )}
342
+ {!description && (
343
+ <React.Fragment>
344
+ {itemDisplay}
345
+ {isSelected && (
346
+ <span className={css(styles.selectMenuItemIcon)}>
347
+ <CheckIcon aria-hidden />
348
+ </span>
349
+ )}
350
+ </React.Fragment>
351
+ )}
387
352
  </Component>
388
- </div>
353
+ {isFavorite !== null && id && favoriteButton(onFavorite)}
354
+ </>
355
+ )}
356
+ </li>
357
+ );
358
+ } else if (variant === SelectVariant.checkbox && isLoad) {
359
+ return (
360
+ <button
361
+ className={css(
362
+ styles.selectMenuItem,
363
+ styles.modifiers.load,
364
+ isFocused && styles.modifiers.focus,
365
+ className
366
+ )}
367
+ onKeyDown={(event: React.KeyboardEvent) => {
368
+ this.onKeyDown(event, 0, undefined, true);
369
+ }}
370
+ onClick={(event: any) => {
371
+ onViewMoreClick(event);
372
+ event.stopPropagation();
373
+ }}
374
+ ref={this.ref}
375
+ >
376
+ {children || (value && value.toString && value.toString())}
377
+ </button>
378
+ );
379
+ } else if (variant === SelectVariant.checkbox && isLoading) {
380
+ return (
381
+ <div className={css(styles.selectListItem, isLoading && styles.modifiers.loading, className)}>{children}</div>
382
+ );
383
+ } else if (variant === SelectVariant.checkbox && !isNoResultsOption && !isLoading && !isLoad) {
384
+ return (
385
+ <label
386
+ {...props}
387
+ className={css(
388
+ checkStyles.check,
389
+ styles.selectMenuItem,
390
+ isDisabled && styles.modifiers.disabled,
391
+ description && styles.modifiers.description,
392
+ className
389
393
  )}
390
- </React.Fragment>
394
+ onKeyDown={(event: React.KeyboardEvent) => {
395
+ this.onKeyDown(event, 0, undefined, true);
396
+ }}
397
+ >
398
+ <input
399
+ id={inputId || `${inputIdPrefix}-${value.toString()}`}
400
+ className={css(checkStyles.checkInput)}
401
+ type="checkbox"
402
+ onChange={event => {
403
+ if (!isDisabled) {
404
+ onClick(event);
405
+ onSelect(event, value);
406
+ }
407
+ }}
408
+ ref={this.ref}
409
+ checked={isChecked || false}
410
+ disabled={isDisabled}
411
+ />
412
+ <span className={css(checkStyles.checkLabel, isDisabled && styles.modifiers.disabled)}>{itemDisplay}</span>
413
+ {description && <div className={css(checkStyles.checkDescription)}>{description}</div>}
414
+ </label>
415
+ );
416
+ } else if (variant === SelectVariant.checkbox && isNoResultsOption && !isLoading && !isLoad) {
417
+ return (
418
+ <div>
419
+ <Component
420
+ {...props}
421
+ className={css(
422
+ styles.selectMenuItem,
423
+ isSelected && styles.modifiers.selected,
424
+ isDisabled && styles.modifiers.disabled,
425
+ className
426
+ )}
427
+ role="option"
428
+ aria-selected={isSelected || null}
429
+ ref={this.ref}
430
+ onKeyDown={(event: React.KeyboardEvent) => {
431
+ this.onKeyDown(event, 0, undefined, true);
432
+ }}
433
+ type="button"
434
+ >
435
+ {itemDisplay}
436
+ </Component>
437
+ </div>
438
+ );
439
+ }
440
+ };
441
+
442
+ return (
443
+ <SelectConsumer>
444
+ {({ onSelect, onClose, variant, inputIdPrefix, onFavorite }) => (
445
+ <React.Fragment>{renderOption(onSelect, onClose, variant, inputIdPrefix, onFavorite)}</React.Fragment>
391
446
  )}
392
447
  </SelectConsumer>
393
448
  );
@@ -109,14 +109,14 @@ export const NestedTabsDemo = () => {
109
109
  <FlexItem flex={{ default: 'flex_1' }}>
110
110
  <Card isFullHeight>
111
111
  <CardHeader>
112
- <Title headingLevel="h3">Title of Card</Title>
112
+ <Title headingLevel="h2">Title of Card</Title>
113
113
  </CardHeader>
114
114
  </Card>
115
115
  </FlexItem>
116
116
  <FlexItem flex={{ default: 'flex_1' }}>
117
117
  <Card isFullHeight>
118
118
  <CardHeader>
119
- <Title headingLevel="h3">Title of Card</Title>
119
+ <Title headingLevel="h2">Title of Card</Title>
120
120
  </CardHeader>
121
121
  </Card>
122
122
  </FlexItem>
@@ -132,7 +132,7 @@ export const NestedTabsDemo = () => {
132
132
  Overview
133
133
  </Title>
134
134
  </PageSection>
135
- <PageSection type="tabs" variant={PageSectionVariants.light} isWidthLimited>
135
+ <PageSection type="tabs" isWidthLimited>
136
136
  <Tabs activeKey={activeTabKey} onSelect={handleTabClick} usePageInsets id="nested-tabs-example-tabs-list">
137
137
  <Tab eventKey={0} title={<TabTitleText>Cluster 1</TabTitleText>} tabContentId={`tabContent${0}`} />
138
138
  <Tab eventKey={1} title={<TabTitleText>Cluster 2</TabTitleText>} tabContentId={`tabContent${1}`} />
package/src/demos/Tabs.md CHANGED
@@ -457,3 +457,7 @@ TabsOpenWithSecondaryTabsDemo = () => {
457
457
 
458
458
  ```js isFullscreen file="./examples/Tabs/ModalTabs.tsx"
459
459
  ```
460
+ ### Gray tabs
461
+
462
+ ```js isFullscreen file="./examples/Tabs/GrayTabs.tsx"
463
+ ```
@@ -0,0 +1,158 @@
1
+ import React from 'react';
2
+ import {
3
+ PageSection,
4
+ PageSectionVariants,
5
+ Tabs,
6
+ Tab,
7
+ TabContent,
8
+ TabContentBody,
9
+ TabTitleText,
10
+ Title,
11
+ Grid,
12
+ GridItem,
13
+ Flex,
14
+ FlexItem,
15
+ Card,
16
+ CardBody,
17
+ CardHeader
18
+ } from '@patternfly/react-core';
19
+ import DashboardWrapper from '../../examples/DashboardWrapper';
20
+
21
+ export const GrayTabsDemo: React.FunctionComponent = () => {
22
+ const [activeTabKey, setActiveTabKey] = React.useState<string | number>(0);
23
+ const [activeNestedTabKey, setActiveNestedTabKey] = React.useState<string | number>(0);
24
+
25
+ // Toggle currently active tab
26
+ const handleTabClick = (_: React.MouseEvent, tabIndex: string | number) => setActiveTabKey(tabIndex);
27
+
28
+ // Toggle currently active nested tab
29
+ const handleNestedTabClick = (_: React.MouseEvent, tabIndex: string | number) => setActiveNestedTabKey(tabIndex);
30
+
31
+ const tabContent = (
32
+ <Grid hasGutter>
33
+ <GridItem xl={8} md={6}>
34
+ <Card>
35
+ <CardHeader>
36
+ <Title headingLevel="h2">Status</Title>
37
+ </CardHeader>
38
+ <CardBody>
39
+ <Flex direction={{ default: 'column' }}>
40
+ <FlexItem>
41
+ <Tabs
42
+ activeKey={activeNestedTabKey}
43
+ isSecondary
44
+ onSelect={handleNestedTabClick}
45
+ id="nested-tabs-example-tabs-list"
46
+ >
47
+ <Tab eventKey={10} title={<TabTitleText>Cluster</TabTitleText>} tabContentId={`tabContent${10}`} />
48
+ <Tab
49
+ eventKey={11}
50
+ title={<TabTitleText>Control plane</TabTitleText>}
51
+ tabContentId={`tabContent${11}`}
52
+ />
53
+ <Tab eventKey={12} title={<TabTitleText>Operators</TabTitleText>} tabContentId={`tabContent${12}`} />
54
+ <Tab
55
+ eventKey={13}
56
+ title={<TabTitleText>Virtualization</TabTitleText>}
57
+ tabContentId={`tabContent${13}`}
58
+ />
59
+ </Tabs>
60
+ </FlexItem>
61
+ <FlexItem>
62
+ <TabContent
63
+ key={10}
64
+ eventKey={10}
65
+ id={`tabContent${10}`}
66
+ activeKey={activeNestedTabKey}
67
+ hidden={10 !== activeNestedTabKey}
68
+ >
69
+ <TabContentBody>
70
+ {
71
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce in odio porttitor, feugiat risus in, feugiat arcu. Nullam euismod enim eget fringilla condimentum. Maecenas tincidunt et metus id aliquet. Integer et fermentum purus. Nulla tempor velit arcu, vitae semper purus iaculis at. Sed malesuada auctor luctus. Pellentesque et leo urna. Aliquam vitae felis congue lacus mattis fringilla. Nullam et ultricies erat, sed dignissim elit. Cras mattis pulvinar aliquam. In ac est nulla. Pellentesque fermentum nibh ac sapien porta, ut congue orci aliquam. Sed nisl est, tempor eu pharetra eget, ullamcorper ut augue. Vestibulum eleifend libero eu nulla cursus lacinia.'
72
+ }
73
+ </TabContentBody>
74
+ </TabContent>
75
+ <TabContent
76
+ key={11}
77
+ eventKey={11}
78
+ id={`tabContent${11}`}
79
+ activeKey={activeNestedTabKey}
80
+ hidden={11 !== activeNestedTabKey}
81
+ >
82
+ <TabContentBody>Control plane panel</TabContentBody>
83
+ </TabContent>
84
+ <TabContent
85
+ key={12}
86
+ eventKey={12}
87
+ id={`tabContent${12}`}
88
+ activeKey={activeNestedTabKey}
89
+ hidden={12 !== activeNestedTabKey}
90
+ >
91
+ <TabContentBody>Operators panel</TabContentBody>
92
+ </TabContent>
93
+ <TabContent
94
+ key={13}
95
+ eventKey={13}
96
+ id={`tabContent${13}`}
97
+ activeKey={activeNestedTabKey}
98
+ hidden={13 !== activeNestedTabKey}
99
+ >
100
+ <TabContentBody>Virtualization panel</TabContentBody>
101
+ </TabContent>
102
+ </FlexItem>
103
+ </Flex>
104
+ </CardBody>
105
+ </Card>
106
+ </GridItem>
107
+ <GridItem xl={4} md={6}>
108
+ <Flex direction={{ default: 'column' }} className="pf-u-h-100">
109
+ <FlexItem flex={{ default: 'flex_1' }}>
110
+ <Card isFullHeight>
111
+ <CardHeader>
112
+ <Title headingLevel="h2">Title of Card</Title>
113
+ </CardHeader>
114
+ </Card>
115
+ </FlexItem>
116
+ <FlexItem flex={{ default: 'flex_1' }}>
117
+ <Card isFullHeight>
118
+ <CardHeader>
119
+ <Title headingLevel="h2">Title of Card</Title>
120
+ </CardHeader>
121
+ </Card>
122
+ </FlexItem>
123
+ </Flex>
124
+ </GridItem>
125
+ </Grid>
126
+ );
127
+
128
+ return (
129
+ <DashboardWrapper hasNoBreadcrumb>
130
+ <PageSection isWidthLimited variant={PageSectionVariants.light}>
131
+ <Title headingLevel="h1" size="2xl">
132
+ Overview
133
+ </Title>
134
+ </PageSection>
135
+ <PageSection type="tabs" isWidthLimited>
136
+ <Tabs
137
+ activeKey={activeTabKey}
138
+ onSelect={handleTabClick}
139
+ usePageInsets
140
+ isBox
141
+ variant="light300"
142
+ id="open-tabs-example-tabs-list"
143
+ >
144
+ <Tab eventKey={0} title={<TabTitleText>Cluster 1</TabTitleText>} tabContentId={`tabContent${0}`} />
145
+ <Tab eventKey={1} title={<TabTitleText>Cluster 2</TabTitleText>} tabContentId={`tabContent${1}`} />
146
+ </Tabs>
147
+ </PageSection>
148
+ <PageSection isWidthLimited>
149
+ <TabContent key={0} eventKey={0} id={`tabContent${0}`} activeKey={activeTabKey} hidden={0 !== activeTabKey}>
150
+ <TabContentBody>{tabContent}</TabContentBody>
151
+ </TabContent>
152
+ <TabContent key={1} eventKey={1} id={`tabContent${1}`} activeKey={activeTabKey} hidden={1 !== activeTabKey}>
153
+ <TabContentBody>Cluster 2 panel</TabContentBody>
154
+ </TabContent>
155
+ </PageSection>
156
+ </DashboardWrapper>
157
+ );
158
+ };