@patternfly/react-core 4.174.2 → 4.175.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/CHANGELOG.md +11 -0
- package/dist/esm/components/Card/Card.d.ts +6 -0
- package/dist/esm/components/Card/Card.d.ts.map +1 -1
- package/dist/esm/components/Card/Card.js +2 -2
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Panel/Panel.d.ts +13 -0
- package/dist/esm/components/Panel/Panel.d.ts.map +1 -0
- package/dist/esm/components/Panel/Panel.js +10 -0
- package/dist/esm/components/Panel/Panel.js.map +1 -0
- package/dist/esm/components/Panel/PanelFooter.d.ts +9 -0
- package/dist/esm/components/Panel/PanelFooter.d.ts.map +1 -0
- package/dist/esm/components/Panel/PanelFooter.js +10 -0
- package/dist/esm/components/Panel/PanelFooter.js.map +1 -0
- package/dist/esm/components/Panel/PanelHeader.d.ts +9 -0
- package/dist/esm/components/Panel/PanelHeader.d.ts.map +1 -0
- package/dist/esm/components/Panel/PanelHeader.js +10 -0
- package/dist/esm/components/Panel/PanelHeader.js.map +1 -0
- package/dist/esm/components/Panel/PanelMain.d.ts +11 -0
- package/dist/esm/components/Panel/PanelMain.d.ts.map +1 -0
- package/dist/esm/components/Panel/PanelMain.js +10 -0
- package/dist/esm/components/Panel/PanelMain.js.map +1 -0
- package/dist/esm/components/Panel/PanelMainBody.d.ts +9 -0
- package/dist/esm/components/Panel/PanelMainBody.d.ts.map +1 -0
- package/dist/esm/components/Panel/PanelMainBody.js +10 -0
- package/dist/esm/components/Panel/PanelMainBody.js.map +1 -0
- package/dist/esm/components/Panel/index.d.ts +6 -0
- package/dist/esm/components/Panel/index.d.ts.map +1 -0
- package/dist/esm/components/Panel/index.js +6 -0
- package/dist/esm/components/Panel/index.js.map +1 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/js/components/Card/Card.d.ts +6 -0
- package/dist/js/components/Card/Card.d.ts.map +1 -1
- package/dist/js/components/Card/Card.js +2 -2
- package/dist/js/components/Card/Card.js.map +1 -1
- package/dist/js/components/Panel/Panel.d.ts +13 -0
- package/dist/js/components/Panel/Panel.d.ts.map +1 -0
- package/dist/js/components/Panel/Panel.js +14 -0
- package/dist/js/components/Panel/Panel.js.map +1 -0
- package/dist/js/components/Panel/PanelFooter.d.ts +9 -0
- package/dist/js/components/Panel/PanelFooter.d.ts.map +1 -0
- package/dist/js/components/Panel/PanelFooter.js +14 -0
- package/dist/js/components/Panel/PanelFooter.js.map +1 -0
- package/dist/js/components/Panel/PanelHeader.d.ts +9 -0
- package/dist/js/components/Panel/PanelHeader.d.ts.map +1 -0
- package/dist/js/components/Panel/PanelHeader.js +14 -0
- package/dist/js/components/Panel/PanelHeader.js.map +1 -0
- package/dist/js/components/Panel/PanelMain.d.ts +11 -0
- package/dist/js/components/Panel/PanelMain.d.ts.map +1 -0
- package/dist/js/components/Panel/PanelMain.js +14 -0
- package/dist/js/components/Panel/PanelMain.js.map +1 -0
- package/dist/js/components/Panel/PanelMainBody.d.ts +9 -0
- package/dist/js/components/Panel/PanelMainBody.d.ts.map +1 -0
- package/dist/js/components/Panel/PanelMainBody.js +14 -0
- package/dist/js/components/Panel/PanelMainBody.js.map +1 -0
- package/dist/js/components/Panel/index.d.ts +6 -0
- package/dist/js/components/Panel/index.d.ts.map +1 -0
- package/dist/js/components/Panel/index.js +9 -0
- package/dist/js/components/Panel/index.js.map +1 -0
- package/dist/js/components/index.d.ts +1 -0
- package/dist/js/components/index.d.ts.map +1 -1
- package/dist/js/components/index.js +1 -0
- package/dist/js/components/index.js.map +1 -1
- package/dist/umd/react-core.css +83 -0
- package/dist/umd/react-core.js +930 -882
- package/dist/umd/react-core.min.css +152 -69
- package/dist/umd/react-core.min.js +4 -4
- package/package.json +5 -5
- package/src/components/Card/Card.tsx +15 -3
- package/src/components/Card/__tests__/Card.test.tsx +24 -0
- package/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap +11 -1
- package/src/components/Card/examples/Card.md +133 -26
- package/src/components/Panel/Panel.tsx +37 -0
- package/src/components/Panel/PanelFooter.tsx +22 -0
- package/src/components/Panel/PanelHeader.tsx +22 -0
- package/src/components/Panel/PanelMain.tsx +29 -0
- package/src/components/Panel/PanelMainBody.tsx +22 -0
- package/src/components/Panel/__tests__/Panel.test.tsx +62 -0
- package/src/components/Panel/__tests__/__snapshots__/Panel.test.tsx.snap +83 -0
- package/src/components/Panel/examples/Panel.md +203 -0
- package/src/components/Panel/index.ts +5 -0
- package/src/components/index.ts +1 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: Panel
|
|
3
|
+
section: components
|
|
4
|
+
cssPrefix: pf-c-panel
|
|
5
|
+
propComponents: [Panel, PanelMain, PanelMainBody, PanelHeader, PanelFooter]
|
|
6
|
+
beta: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Examples
|
|
10
|
+
|
|
11
|
+
### Basic
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
|
|
16
|
+
|
|
17
|
+
const BasicPanel = () => (
|
|
18
|
+
<Panel>
|
|
19
|
+
<PanelMain>
|
|
20
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
21
|
+
</PanelMain>
|
|
22
|
+
</Panel>
|
|
23
|
+
);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Header
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import React from 'react';
|
|
30
|
+
import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider } from '@patternfly/react-core';
|
|
31
|
+
|
|
32
|
+
const HeaderPanel = () => (
|
|
33
|
+
<Panel>
|
|
34
|
+
<PanelHeader>Header content</PanelHeader>
|
|
35
|
+
<Divider />
|
|
36
|
+
<PanelMain>
|
|
37
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
38
|
+
</PanelMain>
|
|
39
|
+
</Panel>
|
|
40
|
+
);
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Footer
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
import React from 'react';
|
|
47
|
+
import { Panel, PanelMain, PanelMainBody, PanelFooter } from '@patternfly/react-core';
|
|
48
|
+
|
|
49
|
+
const FooterPanel = () => (
|
|
50
|
+
<Panel>
|
|
51
|
+
<PanelMain>
|
|
52
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
53
|
+
</PanelMain>
|
|
54
|
+
<PanelFooter>Footer content</PanelFooter>
|
|
55
|
+
</Panel>
|
|
56
|
+
);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Header and footer
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
import React from 'react';
|
|
63
|
+
import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider, PanelFooter } from '@patternfly/react-core';
|
|
64
|
+
|
|
65
|
+
const HeaderFooterPanel = () => (
|
|
66
|
+
<Panel>
|
|
67
|
+
<PanelHeader>Header content</PanelHeader>
|
|
68
|
+
<Divider />
|
|
69
|
+
<PanelMain>
|
|
70
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
71
|
+
</PanelMain>
|
|
72
|
+
<PanelFooter>Footer content</PanelFooter>
|
|
73
|
+
</Panel>
|
|
74
|
+
);
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### No body
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
import React from 'react';
|
|
81
|
+
import { Panel, PanelMain } from '@patternfly/react-core';
|
|
82
|
+
|
|
83
|
+
const NoBodyPanel = () => (
|
|
84
|
+
<Panel>
|
|
85
|
+
<PanelMain>Main content</PanelMain>
|
|
86
|
+
</Panel>
|
|
87
|
+
);
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Raised
|
|
91
|
+
|
|
92
|
+
```js
|
|
93
|
+
import React from 'react';
|
|
94
|
+
import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
|
|
95
|
+
|
|
96
|
+
const RaisedPanel = () => (
|
|
97
|
+
<Panel variant="raised">
|
|
98
|
+
<PanelMain>
|
|
99
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
100
|
+
</PanelMain>
|
|
101
|
+
</Panel>
|
|
102
|
+
);
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Bordered
|
|
106
|
+
|
|
107
|
+
```js
|
|
108
|
+
import React from 'react';
|
|
109
|
+
import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
|
|
110
|
+
|
|
111
|
+
const BorderedPanel = () => (
|
|
112
|
+
<Panel variant="bordered">
|
|
113
|
+
<PanelMain>
|
|
114
|
+
<PanelMainBody>Main content</PanelMainBody>
|
|
115
|
+
</PanelMain>
|
|
116
|
+
</Panel>
|
|
117
|
+
);
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Scrollable
|
|
121
|
+
|
|
122
|
+
```js
|
|
123
|
+
import React from 'react';
|
|
124
|
+
import { Panel, PanelMain, PanelMainBody } from '@patternfly/react-core';
|
|
125
|
+
|
|
126
|
+
const ScrollablePanel = () => (
|
|
127
|
+
<Panel isScrollable>
|
|
128
|
+
<PanelMain tabIndex={0}>
|
|
129
|
+
<PanelMainBody>
|
|
130
|
+
Main content
|
|
131
|
+
<br />
|
|
132
|
+
<br />
|
|
133
|
+
Main content
|
|
134
|
+
<br />
|
|
135
|
+
<br />
|
|
136
|
+
Main content
|
|
137
|
+
<br />
|
|
138
|
+
<br />
|
|
139
|
+
Main content
|
|
140
|
+
<br />
|
|
141
|
+
<br />
|
|
142
|
+
Main content
|
|
143
|
+
<br />
|
|
144
|
+
<br />
|
|
145
|
+
Main content
|
|
146
|
+
<br />
|
|
147
|
+
<br />
|
|
148
|
+
Main content
|
|
149
|
+
<br />
|
|
150
|
+
<br />
|
|
151
|
+
Main content
|
|
152
|
+
<br />
|
|
153
|
+
<br />
|
|
154
|
+
Main content
|
|
155
|
+
</PanelMainBody>
|
|
156
|
+
</PanelMain>
|
|
157
|
+
</Panel>
|
|
158
|
+
);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Scrollable with header and footer
|
|
162
|
+
|
|
163
|
+
```js
|
|
164
|
+
import React from 'react';
|
|
165
|
+
import { Panel, PanelMain, PanelMainBody, PanelHeader, Divider, PanelFooter } from '@patternfly/react-core';
|
|
166
|
+
|
|
167
|
+
const ScrollableHeaderFooterPanel = () => (
|
|
168
|
+
<Panel isScrollable>
|
|
169
|
+
<PanelHeader>Header content</PanelHeader>
|
|
170
|
+
<Divider />
|
|
171
|
+
<PanelMain tabIndex={0}>
|
|
172
|
+
<PanelMainBody>
|
|
173
|
+
Main content
|
|
174
|
+
<br />
|
|
175
|
+
<br />
|
|
176
|
+
Main content
|
|
177
|
+
<br />
|
|
178
|
+
<br />
|
|
179
|
+
Main content
|
|
180
|
+
<br />
|
|
181
|
+
<br />
|
|
182
|
+
Main content
|
|
183
|
+
<br />
|
|
184
|
+
<br />
|
|
185
|
+
Main content
|
|
186
|
+
<br />
|
|
187
|
+
<br />
|
|
188
|
+
Main content
|
|
189
|
+
<br />
|
|
190
|
+
<br />
|
|
191
|
+
Main content
|
|
192
|
+
<br />
|
|
193
|
+
<br />
|
|
194
|
+
Main content
|
|
195
|
+
<br />
|
|
196
|
+
<br />
|
|
197
|
+
Main content
|
|
198
|
+
</PanelMainBody>
|
|
199
|
+
</PanelMain>
|
|
200
|
+
<PanelFooter>Footer content</PanelFooter>
|
|
201
|
+
</Panel>
|
|
202
|
+
);
|
|
203
|
+
```
|
package/src/components/index.ts
CHANGED