@patternfly/react-core 4.191.6 → 4.192.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/DataList/DataListCheck.d.ts +1 -1
- package/dist/esm/components/DataList/DataListCheck.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalBoxCloseButton.d.ts +2 -1
- package/dist/esm/components/Modal/ModalBoxCloseButton.d.ts.map +1 -1
- package/dist/esm/components/Modal/ModalBoxCloseButton.js +2 -2
- package/dist/esm/components/Modal/ModalBoxCloseButton.js.map +1 -1
- package/dist/esm/components/Modal/ModalContent.js +1 -1
- package/dist/esm/components/Modal/ModalContent.js.map +1 -1
- package/dist/esm/components/Truncate/Truncate.d.ts +21 -0
- package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -0
- package/dist/esm/components/Truncate/Truncate.js +34 -0
- package/dist/esm/components/Truncate/Truncate.js.map +1 -0
- package/dist/esm/components/Truncate/index.d.ts +2 -0
- package/dist/esm/components/Truncate/index.d.ts.map +1 -0
- package/dist/esm/components/Truncate/index.js +2 -0
- package/dist/esm/components/Truncate/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/DataList/DataListCheck.d.ts +1 -1
- package/dist/js/components/DataList/DataListCheck.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalBoxCloseButton.d.ts +2 -1
- package/dist/js/components/Modal/ModalBoxCloseButton.d.ts.map +1 -1
- package/dist/js/components/Modal/ModalBoxCloseButton.js +2 -2
- package/dist/js/components/Modal/ModalBoxCloseButton.js.map +1 -1
- package/dist/js/components/Modal/ModalContent.js +1 -1
- package/dist/js/components/Modal/ModalContent.js.map +1 -1
- package/dist/js/components/Truncate/Truncate.d.ts +21 -0
- package/dist/js/components/Truncate/Truncate.d.ts.map +1 -0
- package/dist/js/components/Truncate/Truncate.js +38 -0
- package/dist/js/components/Truncate/Truncate.js.map +1 -0
- package/dist/js/components/Truncate/index.d.ts +2 -0
- package/dist/js/components/Truncate/index.d.ts.map +1 -0
- package/dist/js/components/Truncate/index.js +5 -0
- package/dist/js/components/Truncate/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 +59 -6
- package/dist/umd/react-core.js +942 -902
- package/dist/umd/react-core.min.css +59 -6
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +6 -6
- package/src/components/BackToTop/examples/BackToTop.md +1 -1
- package/src/components/DataList/DataListCheck.tsx +1 -1
- package/src/components/Modal/ModalBoxCloseButton.tsx +11 -2
- package/src/components/Modal/ModalContent.tsx +1 -1
- package/src/components/Modal/examples/Modal.md +3 -200
- package/src/components/Modal/examples/ModalWithForm.tsx +209 -0
- package/src/components/Truncate/Truncate.tsx +63 -0
- package/src/components/Truncate/__tests__/Truncate.test.tsx +18 -0
- package/src/components/Truncate/__tests__/__snapshots__/Truncate.test.tsx.snap +58 -0
- package/src/components/Truncate/examples/Truncate.md +59 -0
- package/src/components/Truncate/examples/TruncateExamples.css +9 -0
- package/src/components/Truncate/index.ts +1 -0
- package/src/components/index.ts +1 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: Truncate
|
|
3
|
+
section: components
|
|
4
|
+
propComponents: [Truncate]
|
|
5
|
+
beta: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
import './TruncateExamples.css';
|
|
9
|
+
|
|
10
|
+
## Examples
|
|
11
|
+
|
|
12
|
+
### Default
|
|
13
|
+
```js
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { Truncate } from '@patternfly/react-core';
|
|
16
|
+
<div className="pf-c-truncate--example">
|
|
17
|
+
<Truncate
|
|
18
|
+
content={'Vestibulum interdum risus et enim faucibus, sit amet molestie est accumsan.'}
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Middle
|
|
24
|
+
|
|
25
|
+
```js
|
|
26
|
+
import React from 'react';
|
|
27
|
+
import { Truncate } from '@patternfly/react-core';
|
|
28
|
+
<div className="pf-c-truncate--example">
|
|
29
|
+
<Truncate
|
|
30
|
+
content={'redhat_logo_black_and_white_reversed_simple_with_fedora_container.zip'}
|
|
31
|
+
trailingNumChars={10}
|
|
32
|
+
position={'middle'}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Start
|
|
38
|
+
```js
|
|
39
|
+
import React from 'react';
|
|
40
|
+
import { Truncate } from '@patternfly/react-core';
|
|
41
|
+
<div className="pf-c-truncate--example">
|
|
42
|
+
<Truncate
|
|
43
|
+
content={'Vestibulum interdum risus et enim faucibus, sit amet molestie est accumsan.'}
|
|
44
|
+
position={'start'}
|
|
45
|
+
/>
|
|
46
|
+
</div>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Default with tooltip at the bottom
|
|
50
|
+
```js
|
|
51
|
+
import React from 'react';
|
|
52
|
+
import { Truncate } from '@patternfly/react-core';
|
|
53
|
+
<div className="pf-c-truncate--example">
|
|
54
|
+
<Truncate
|
|
55
|
+
content={'Vestibulum interdum risus et enim faucibus, sit amet molestie est accumsan.'}
|
|
56
|
+
tooltipPosition={'bottom'}
|
|
57
|
+
/>
|
|
58
|
+
</div>
|
|
59
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Truncate';
|
package/src/components/index.ts
CHANGED