-
Notifications
You must be signed in to change notification settings - Fork 381
Expand file tree
/
Copy pathLabelCompact.tsx
More file actions
83 lines (82 loc) · 2.92 KB
/
LabelCompact.tsx
File metadata and controls
83 lines (82 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import { Fragment } from 'react';
import { Label, LabelColor } from '@patternfly/react-core';
import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
import RhUiInformationFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-information-fill-icon';
export const LabelCompact: React.FunctionComponent = () => (
<Fragment>
<Label isCompact>Compact</Label>
<Label isCompact icon={<CubeIcon />}>
Compact icon
</Label>
<Label isCompact onClose={() => Function.prototype}>
Compact removable
</Label>
<Label isCompact icon={<CubeIcon />} onClose={() => Function.prototype}>
Compact icon removable
</Label>
<Label isCompact href="#compact">
Compact link
</Label>
<Label isCompact href="#compact" onClose={() => Function.prototype}>
Compact link removable
</Label>{' '}
<Label isCompact onClick={() => Function.prototype}>
Compact clickable
</Label>{' '}
<Label isCompact onClick={() => Function.prototype} onClose={() => Function.prototype}>
Compact clickable removable
</Label>{' '}
<Label isCompact icon={<CubeIcon />} onClose={() => Function.prototype} textMaxWidth="16ch">
Compact label with icon that overflows
</Label>{' '}
<Label isDisabled isCompact href="#compact" onClose={() => Function.prototype} icon={<CubeIcon />}>
Compact link removable (disabled)
</Label>{' '}
<Label
isDisabled
isCompact
onClick={() => Function.prototype}
onClose={() => Function.prototype}
icon={<CubeIcon />}
>
Compact clickable removable (disabled)
</Label>
<Label variant="outline" color={LabelColor.blue} isCompact icon={<CubeIcon />}>
Compact icon
</Label>
<Label variant="outline" color={LabelColor.blue} isCompact onClose={() => Function.prototype}>
Compact removable
</Label>
<Label variant="outline" color={LabelColor.blue} isCompact icon={<CubeIcon />} onClose={() => Function.prototype}>
Compact icon removable
</Label>
<Label variant="outline" color={LabelColor.blue} isCompact href="#compact">
Compact link
</Label>
<Label variant="outline" color={LabelColor.blue} isCompact href="#compact" onClose={() => Function.prototype}>
Compact link removable
</Label>
<Label
variant="outline"
color={LabelColor.blue}
isCompact
icon={<CubeIcon />}
onClose={() => Function.prototype}
textMaxWidth="16ch"
>
Compact label with icon that overflows
</Label>{' '}
<Label isDisabled isCompact href="#compact" onClose={() => Function.prototype} icon={<RhUiInformationFillIcon />}>
Compact link removable (disabled)
</Label>{' '}
<Label
isDisabled
isCompact
onClick={() => Function.prototype}
onClose={() => Function.prototype}
icon={<RhUiInformationFillIcon />}
>
Compact clickable removable (disabled)
</Label>
</Fragment>
);