| 1 |
import { Truncate, TruncatePosition } from '@patternfly/react-core'; |
| 2 |
|
| 3 |
export const TruncateMaxChars: React.FunctionComponent = () => ( |
| 4 |
<> |
| 5 |
<div>Truncated at end position:</div> |
| 6 |
<Truncate |
| 7 |
maxCharsDisplayed={15} |
| 8 |
content={'redhat_logo_black_and_white_reversed_simple_with_fedora_container.zip'} |
| 9 |
/> |
| 10 |
<br /> |
| 11 |
<br /> |
| 12 |
<div>Truncated at middle position:</div> |
| 13 |
<Truncate |
| 14 |
maxCharsDisplayed={15} |
| 15 |
position={TruncatePosition.middle} |
| 16 |
content={'redhat_logo_black_and_white_reversed_simple_with_fedora_container.zip'} |
| 17 |
/> |
| 18 |
<br /> |
| 19 |
<br /> |
| 20 |
<div>Truncated at start position:</div> |
| 21 |
<Truncate |
| 22 |
maxCharsDisplayed={15} |
| 23 |
position={TruncatePosition.start} |
| 24 |
content={'redhat_logo_black_and_white_reversed_simple_with_fedora_container.zip'} |
| 25 |
/> |
| 26 |
</> |
| 27 |
); |