@patternfly/react-core 4.222.2 → 4.222.3
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 +8 -0
- package/dist/umd/react-core.css +64 -68
- package/dist/umd/react-core.min.css +1 -5
- package/package.json +6 -6
- package/src/components/Label/examples/Label.md +5 -399
- package/src/components/Label/examples/LabelCompact.tsx +27 -0
- package/src/components/Label/examples/LabelFilled.tsx +167 -0
- package/src/components/Label/examples/LabelOutline.tsx +188 -0
- package/src/components/Label/examples/LabelRouterLink.tsx +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 4.222.3 (2022-06-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/react-core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## 4.222.2 (2022-06-15)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @patternfly/react-core
|
package/dist/umd/react-core.css
CHANGED
|
@@ -11978,10 +11978,6 @@ ul.pf-c-list {
|
|
|
11978
11978
|
--pf-c-menu--m-nav__list-item--first-child--c-menu--Top: 0;
|
|
11979
11979
|
}
|
|
11980
11980
|
|
|
11981
|
-
.pf-c-menu .pf-c-menu__content {
|
|
11982
|
-
overflow: visible hidden;
|
|
11983
|
-
}
|
|
11984
|
-
|
|
11985
11981
|
.pf-c-menu .pf-c-menu__content .pf-c-menu .pf-c-menu__content {
|
|
11986
11982
|
overflow: visible;
|
|
11987
11983
|
}
|
|
@@ -12024,7 +12020,7 @@ ul.pf-c-list {
|
|
|
12024
12020
|
|
|
12025
12021
|
.pf-c-menu.pf-m-drilldown > .pf-c-menu__content {
|
|
12026
12022
|
flex-grow: 1;
|
|
12027
|
-
overflow
|
|
12023
|
+
overflow: hidden;
|
|
12028
12024
|
transition: var(--pf-c-menu--m-drilldown__content--Transition);
|
|
12029
12025
|
}
|
|
12030
12026
|
|
|
@@ -23044,69 +23040,6 @@ svg.pf-c-spinner.pf-m-xl {
|
|
|
23044
23040
|
color: var(--pf-global--Color--100);
|
|
23045
23041
|
}
|
|
23046
23042
|
|
|
23047
|
-
.pf-c-draggable {
|
|
23048
|
-
--pf-c-draggable--Cursor: auto;
|
|
23049
|
-
--pf-c-draggable--m-dragging--Cursor: grabbing;
|
|
23050
|
-
--pf-c-draggable--m-dragging--BoxShadow: var(--pf-global--BoxShadow--md);
|
|
23051
|
-
--pf-c-draggable--m-dragging--after--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
23052
|
-
--pf-c-draggable--m-dragging--after--BorderColor: var(--pf-global--active-color--100);
|
|
23053
|
-
--pf-c-draggable--m-drag-outside--Cursor: not-allowed;
|
|
23054
|
-
--pf-c-draggable--m-drag-outside--after--BorderColor: var(--pf-global--danger-color--100);
|
|
23055
|
-
cursor: var(--pf-c-draggable--Cursor);
|
|
23056
|
-
}
|
|
23057
|
-
|
|
23058
|
-
.pf-c-draggable.pf-m-dragging {
|
|
23059
|
-
--pf-c-draggable--Cursor: var(--pf-c-draggable--m-dragging--Cursor);
|
|
23060
|
-
position: relative;
|
|
23061
|
-
background-color: var(--pf-c-draggable--m-dragging--BackgroundColor);
|
|
23062
|
-
box-shadow: var(--pf-c-draggable--m-dragging--BoxShadow);
|
|
23063
|
-
}
|
|
23064
|
-
|
|
23065
|
-
.pf-c-draggable.pf-m-dragging::after {
|
|
23066
|
-
position: absolute;
|
|
23067
|
-
top: 0;
|
|
23068
|
-
right: 0;
|
|
23069
|
-
bottom: 0;
|
|
23070
|
-
left: 0;
|
|
23071
|
-
content: "";
|
|
23072
|
-
border: var(--pf-c-draggable--m-dragging--after--BorderWidth) solid var(--pf-c-draggable--m-dragging--after--BorderColor);
|
|
23073
|
-
}
|
|
23074
|
-
|
|
23075
|
-
.pf-c-draggable.pf-m-drag-outside {
|
|
23076
|
-
--pf-c-draggable--m-dragging--Cursor: var(--pf-c-draggable--m-drag-outside--Cursor);
|
|
23077
|
-
--pf-c-draggable--m-dragging--after--BorderColor: var(--pf-c-draggable--m-drag-outside--after--BorderColor);
|
|
23078
|
-
}
|
|
23079
|
-
|
|
23080
|
-
.pf-c-droppable {
|
|
23081
|
-
--pf-c-droppable--m-dragging--after--BackgroundColor: rgba(255, 255, 255, 0.6);
|
|
23082
|
-
--pf-c-droppable--m-dragging--after--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
23083
|
-
--pf-c-droppable--m-dragging--after--BorderColor: var(--pf-global--active-color--100);
|
|
23084
|
-
--pf-c-droppable--m-drag-outside--after--BorderColor: var(--pf-global--danger-color--100);
|
|
23085
|
-
}
|
|
23086
|
-
|
|
23087
|
-
.pf-c-droppable.pf-m-dragging {
|
|
23088
|
-
position: relative;
|
|
23089
|
-
}
|
|
23090
|
-
|
|
23091
|
-
.pf-c-droppable.pf-m-dragging::after {
|
|
23092
|
-
position: absolute;
|
|
23093
|
-
top: 0;
|
|
23094
|
-
right: 0;
|
|
23095
|
-
bottom: 0;
|
|
23096
|
-
left: 0;
|
|
23097
|
-
pointer-events: none;
|
|
23098
|
-
content: "";
|
|
23099
|
-
}
|
|
23100
|
-
|
|
23101
|
-
.pf-c-droppable::after {
|
|
23102
|
-
background-color: var(--pf-c-droppable--m-dragging--after--BackgroundColor);
|
|
23103
|
-
border: var(--pf-c-droppable--m-dragging--after--BorderWidth) solid var(--pf-c-droppable--m-dragging--after--BorderColor);
|
|
23104
|
-
}
|
|
23105
|
-
|
|
23106
|
-
.pf-c-droppable.pf-m-drag-outside {
|
|
23107
|
-
--pf-c-droppable--m-dragging--after--BorderColor: var(--pf-c-droppable--m-drag-outside--after--BorderColor);
|
|
23108
|
-
}
|
|
23109
|
-
|
|
23110
23043
|
.pf-c-text-input-group {
|
|
23111
23044
|
--pf-c-text-input-group--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
23112
23045
|
--pf-c-text-input-group__text--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
@@ -26755,6 +26688,69 @@ svg.pf-c-spinner.pf-m-xl {
|
|
|
26755
26688
|
grid-gap: var(--pf-l-grid--m-gutter--GridGap);
|
|
26756
26689
|
}
|
|
26757
26690
|
|
|
26691
|
+
.pf-c-draggable {
|
|
26692
|
+
--pf-c-draggable--Cursor: auto;
|
|
26693
|
+
--pf-c-draggable--m-dragging--Cursor: grabbing;
|
|
26694
|
+
--pf-c-draggable--m-dragging--BoxShadow: var(--pf-global--BoxShadow--md);
|
|
26695
|
+
--pf-c-draggable--m-dragging--after--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
26696
|
+
--pf-c-draggable--m-dragging--after--BorderColor: var(--pf-global--active-color--100);
|
|
26697
|
+
--pf-c-draggable--m-drag-outside--Cursor: not-allowed;
|
|
26698
|
+
--pf-c-draggable--m-drag-outside--after--BorderColor: var(--pf-global--danger-color--100);
|
|
26699
|
+
cursor: var(--pf-c-draggable--Cursor);
|
|
26700
|
+
}
|
|
26701
|
+
|
|
26702
|
+
.pf-c-draggable.pf-m-dragging {
|
|
26703
|
+
--pf-c-draggable--Cursor: var(--pf-c-draggable--m-dragging--Cursor);
|
|
26704
|
+
position: relative;
|
|
26705
|
+
background-color: var(--pf-c-draggable--m-dragging--BackgroundColor);
|
|
26706
|
+
box-shadow: var(--pf-c-draggable--m-dragging--BoxShadow);
|
|
26707
|
+
}
|
|
26708
|
+
|
|
26709
|
+
.pf-c-draggable.pf-m-dragging::after {
|
|
26710
|
+
position: absolute;
|
|
26711
|
+
top: 0;
|
|
26712
|
+
right: 0;
|
|
26713
|
+
bottom: 0;
|
|
26714
|
+
left: 0;
|
|
26715
|
+
content: "";
|
|
26716
|
+
border: var(--pf-c-draggable--m-dragging--after--BorderWidth) solid var(--pf-c-draggable--m-dragging--after--BorderColor);
|
|
26717
|
+
}
|
|
26718
|
+
|
|
26719
|
+
.pf-c-draggable.pf-m-drag-outside {
|
|
26720
|
+
--pf-c-draggable--m-dragging--Cursor: var(--pf-c-draggable--m-drag-outside--Cursor);
|
|
26721
|
+
--pf-c-draggable--m-dragging--after--BorderColor: var(--pf-c-draggable--m-drag-outside--after--BorderColor);
|
|
26722
|
+
}
|
|
26723
|
+
|
|
26724
|
+
.pf-c-droppable {
|
|
26725
|
+
--pf-c-droppable--m-dragging--after--BackgroundColor: rgba(255, 255, 255, 0.6);
|
|
26726
|
+
--pf-c-droppable--m-dragging--after--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
26727
|
+
--pf-c-droppable--m-dragging--after--BorderColor: var(--pf-global--active-color--100);
|
|
26728
|
+
--pf-c-droppable--m-drag-outside--after--BorderColor: var(--pf-global--danger-color--100);
|
|
26729
|
+
}
|
|
26730
|
+
|
|
26731
|
+
.pf-c-droppable.pf-m-dragging {
|
|
26732
|
+
position: relative;
|
|
26733
|
+
}
|
|
26734
|
+
|
|
26735
|
+
.pf-c-droppable.pf-m-dragging::after {
|
|
26736
|
+
position: absolute;
|
|
26737
|
+
top: 0;
|
|
26738
|
+
right: 0;
|
|
26739
|
+
bottom: 0;
|
|
26740
|
+
left: 0;
|
|
26741
|
+
pointer-events: none;
|
|
26742
|
+
content: "";
|
|
26743
|
+
}
|
|
26744
|
+
|
|
26745
|
+
.pf-c-droppable::after {
|
|
26746
|
+
background-color: var(--pf-c-droppable--m-dragging--after--BackgroundColor);
|
|
26747
|
+
border: var(--pf-c-droppable--m-dragging--after--BorderWidth) solid var(--pf-c-droppable--m-dragging--after--BorderColor);
|
|
26748
|
+
}
|
|
26749
|
+
|
|
26750
|
+
.pf-c-droppable.pf-m-drag-outside {
|
|
26751
|
+
--pf-c-droppable--m-dragging--after--BorderColor: var(--pf-c-droppable--m-drag-outside--after--BorderColor);
|
|
26752
|
+
}
|
|
26753
|
+
|
|
26758
26754
|
.pf-l-level {
|
|
26759
26755
|
--pf-l-level--m-gutter--MarginRight: var(--pf-global--gutter);
|
|
26760
26756
|
display: flex;
|
|
@@ -11978,10 +11978,6 @@ ul.pf-c-list {
|
|
|
11978
11978
|
--pf-c-menu--m-nav__list-item--first-child--c-menu--Top: 0;
|
|
11979
11979
|
}
|
|
11980
11980
|
|
|
11981
|
-
.pf-c-menu .pf-c-menu__content {
|
|
11982
|
-
overflow: visible hidden;
|
|
11983
|
-
}
|
|
11984
|
-
|
|
11985
11981
|
.pf-c-menu .pf-c-menu__content .pf-c-menu .pf-c-menu__content {
|
|
11986
11982
|
overflow: visible;
|
|
11987
11983
|
}
|
|
@@ -12024,7 +12020,7 @@ ul.pf-c-list {
|
|
|
12024
12020
|
|
|
12025
12021
|
.pf-c-menu.pf-m-drilldown > .pf-c-menu__content {
|
|
12026
12022
|
flex-grow: 1;
|
|
12027
|
-
overflow
|
|
12023
|
+
overflow: hidden;
|
|
12028
12024
|
transition: var(--pf-c-menu--m-drilldown__content--Transition);
|
|
12029
12025
|
}
|
|
12030
12026
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.222.
|
|
3
|
+
"version": "4.222.3",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"generate": "node scripts/copyStyles.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@patternfly/react-icons": "^4.73.
|
|
38
|
-
"@patternfly/react-styles": "^4.72.
|
|
39
|
-
"@patternfly/react-tokens": "^4.74.
|
|
37
|
+
"@patternfly/react-icons": "^4.73.3",
|
|
38
|
+
"@patternfly/react-styles": "^4.72.3",
|
|
39
|
+
"@patternfly/react-tokens": "^4.74.3",
|
|
40
40
|
"focus-trap": "6.9.2",
|
|
41
41
|
"react-dropzone": "9.0.0",
|
|
42
42
|
"tippy.js": "5.1.2",
|
|
43
43
|
"tslib": "^2.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@patternfly/patternfly": "4.196.
|
|
46
|
+
"@patternfly/patternfly": "4.196.8",
|
|
47
47
|
"@rollup/plugin-commonjs": "^21.0.0",
|
|
48
48
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
49
49
|
"@rollup/plugin-replace": "^3.0.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"react": "^16.8.0 || ^17.0.0",
|
|
61
61
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "302f7d03810ce43c87e50939e21e46e6f7029ca9"
|
|
64
64
|
}
|
|
@@ -12,416 +12,22 @@ import { Link } from '@reach/router';
|
|
|
12
12
|
|
|
13
13
|
### Filled
|
|
14
14
|
|
|
15
|
-
```
|
|
16
|
-
import React from 'react';
|
|
17
|
-
import { Label } from '@patternfly/react-core';
|
|
18
|
-
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
19
|
-
|
|
20
|
-
<React.Fragment>
|
|
21
|
-
<Label>Grey</Label> <Label icon={<InfoCircleIcon />}>Grey icon</Label>{' '}
|
|
22
|
-
<Label onClose={Function.prototype}>Grey removable</Label>{' '}
|
|
23
|
-
<Label icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
24
|
-
Grey icon removable
|
|
25
|
-
</Label>{' '}
|
|
26
|
-
<Label href="#filled">Grey link</Label>{' '}
|
|
27
|
-
<Label href="#filled" onClose={Function.prototype}>
|
|
28
|
-
Grey link removable
|
|
29
|
-
</Label>
|
|
30
|
-
<Label icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
31
|
-
Grey label with icon that overflows
|
|
32
|
-
</Label>
|
|
33
|
-
<br />
|
|
34
|
-
<br />
|
|
35
|
-
<Label color="blue">Blue</Label>{' '}
|
|
36
|
-
<Label color="blue" icon={<InfoCircleIcon />}>
|
|
37
|
-
Blue icon
|
|
38
|
-
</Label>{' '}
|
|
39
|
-
<Label color="blue" onClose={Function.prototype}>
|
|
40
|
-
Blue removable
|
|
41
|
-
</Label>{' '}
|
|
42
|
-
<Label color="blue" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
43
|
-
Blue icon removable
|
|
44
|
-
</Label>{' '}
|
|
45
|
-
<Label color="blue" href="#filled">
|
|
46
|
-
Blue link
|
|
47
|
-
</Label>{' '}
|
|
48
|
-
<Label color="blue" href="#filled" onClose={Function.prototype}>
|
|
49
|
-
Blue link removable
|
|
50
|
-
</Label>
|
|
51
|
-
<Label color="blue" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
52
|
-
Blue label with icon that overflows
|
|
53
|
-
</Label>
|
|
54
|
-
<br />
|
|
55
|
-
<br />
|
|
56
|
-
<Label color="green">Green</Label>{' '}
|
|
57
|
-
<Label color="green" icon={<InfoCircleIcon />}>
|
|
58
|
-
Green icon
|
|
59
|
-
</Label>{' '}
|
|
60
|
-
<Label color="green" onClose={Function.prototype}>
|
|
61
|
-
Green removable
|
|
62
|
-
</Label>{' '}
|
|
63
|
-
<Label color="green" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
64
|
-
Green icon removable
|
|
65
|
-
</Label>{' '}
|
|
66
|
-
<Label color="green" href="#filled">
|
|
67
|
-
Green link
|
|
68
|
-
</Label>{' '}
|
|
69
|
-
<Label color="green" href="#filled" onClose={Function.prototype}>
|
|
70
|
-
Green link removable
|
|
71
|
-
</Label>
|
|
72
|
-
<Label color="green" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
73
|
-
Green label with icon that overflows
|
|
74
|
-
</Label>
|
|
75
|
-
<br />
|
|
76
|
-
<br />
|
|
77
|
-
<Label color="orange">Orange</Label>{' '}
|
|
78
|
-
<Label color="orange" icon={<InfoCircleIcon />}>
|
|
79
|
-
Orange icon
|
|
80
|
-
</Label>{' '}
|
|
81
|
-
<Label color="orange" onClose={Function.prototype}>
|
|
82
|
-
Orange removable
|
|
83
|
-
</Label>{' '}
|
|
84
|
-
<Label color="orange" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
85
|
-
Orange icon removable
|
|
86
|
-
</Label>{' '}
|
|
87
|
-
<Label color="orange" href="#filled">
|
|
88
|
-
Orange link
|
|
89
|
-
</Label>{' '}
|
|
90
|
-
<Label color="orange" href="#filled" onClose={Function.prototype}>
|
|
91
|
-
Orange link removable
|
|
92
|
-
</Label>
|
|
93
|
-
<Label color="orange" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
94
|
-
Orange label with icon that overflows
|
|
95
|
-
</Label>
|
|
96
|
-
<br />
|
|
97
|
-
<br />
|
|
98
|
-
<Label color="red">Red</Label>{' '}
|
|
99
|
-
<Label color="red" icon={<InfoCircleIcon />}>
|
|
100
|
-
Red icon
|
|
101
|
-
</Label>{' '}
|
|
102
|
-
<Label color="red" onClose={Function.prototype}>
|
|
103
|
-
Red removable
|
|
104
|
-
</Label>{' '}
|
|
105
|
-
<Label color="red" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
106
|
-
Red icon removable
|
|
107
|
-
</Label>{' '}
|
|
108
|
-
<Label color="red" href="#filled">
|
|
109
|
-
Red link
|
|
110
|
-
</Label>{' '}
|
|
111
|
-
<Label color="red" href="#filled" onClose={Function.prototype}>
|
|
112
|
-
Red link removable
|
|
113
|
-
</Label>
|
|
114
|
-
<Label color="red" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
115
|
-
Red label with icon that overflows
|
|
116
|
-
</Label>
|
|
117
|
-
<br />
|
|
118
|
-
<br />
|
|
119
|
-
<Label color="purple">Purple</Label>{' '}
|
|
120
|
-
<Label color="purple" icon={<InfoCircleIcon />}>
|
|
121
|
-
Purple icon
|
|
122
|
-
</Label>{' '}
|
|
123
|
-
<Label color="purple" onClose={Function.prototype}>
|
|
124
|
-
Purple removable
|
|
125
|
-
</Label>{' '}
|
|
126
|
-
<Label color="purple" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
127
|
-
Purple icon removable
|
|
128
|
-
</Label>{' '}
|
|
129
|
-
<Label color="purple" href="#filled">
|
|
130
|
-
Purple link
|
|
131
|
-
</Label>{' '}
|
|
132
|
-
<Label color="purple" href="#filled" onClose={Function.prototype}>
|
|
133
|
-
Purple link removable
|
|
134
|
-
</Label>
|
|
135
|
-
<Label color="purple" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
136
|
-
Purple label with icon that overflows
|
|
137
|
-
</Label>
|
|
138
|
-
<br />
|
|
139
|
-
<br />
|
|
140
|
-
<Label color="cyan">Cyan</Label>{' '}
|
|
141
|
-
<Label color="cyan" icon={<InfoCircleIcon />}>
|
|
142
|
-
Cyan icon
|
|
143
|
-
</Label>{' '}
|
|
144
|
-
<Label color="cyan" onClose={Function.prototype}>
|
|
145
|
-
Cyan removable
|
|
146
|
-
</Label>{' '}
|
|
147
|
-
<Label color="cyan" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
148
|
-
Cyan icon removable
|
|
149
|
-
</Label>{' '}
|
|
150
|
-
<Label color="cyan" href="#filled">
|
|
151
|
-
Cyan link
|
|
152
|
-
</Label>{' '}
|
|
153
|
-
<Label color="cyan" href="#filled" onClose={Function.prototype}>
|
|
154
|
-
Cyan link removable
|
|
155
|
-
</Label>
|
|
156
|
-
<Label color="cyan" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
157
|
-
Cyan label with icon that overflows
|
|
158
|
-
</Label>
|
|
159
|
-
<br />
|
|
160
|
-
<br />
|
|
161
|
-
<Label color="gold">Gold</Label>{' '}
|
|
162
|
-
<Label color="gold" icon={<InfoCircleIcon />}>
|
|
163
|
-
Gold icon
|
|
164
|
-
</Label>{' '}
|
|
165
|
-
<Label color="gold" onClose={Function.prototype}>
|
|
166
|
-
Gold removable
|
|
167
|
-
</Label>{' '}
|
|
168
|
-
<Label color="gold" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
169
|
-
Gold icon removable
|
|
170
|
-
</Label>{' '}
|
|
171
|
-
<Label color="gold" href="#filled">
|
|
172
|
-
Gold link
|
|
173
|
-
</Label>{' '}
|
|
174
|
-
<Label color="gold" href="#filled" onClose={Function.prototype}>
|
|
175
|
-
Gold link removable
|
|
176
|
-
</Label>
|
|
177
|
-
<Label color="gold" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
178
|
-
Gold label with icon that overflows
|
|
179
|
-
</Label>
|
|
180
|
-
</React.Fragment>;
|
|
15
|
+
```ts file="LabelFilled.tsx"
|
|
181
16
|
```
|
|
182
17
|
|
|
183
18
|
### Outline
|
|
184
19
|
|
|
185
|
-
```
|
|
186
|
-
import React from 'react';
|
|
187
|
-
import { Label } from '@patternfly/react-core';
|
|
188
|
-
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
189
|
-
|
|
190
|
-
<React.Fragment>
|
|
191
|
-
<Label variant="outline">Grey</Label>{' '}
|
|
192
|
-
<Label variant="outline" icon={<InfoCircleIcon />}>
|
|
193
|
-
Grey icon
|
|
194
|
-
</Label>{' '}
|
|
195
|
-
<Label variant="outline" onClose={Function.prototype}>
|
|
196
|
-
Grey removable
|
|
197
|
-
</Label>{' '}
|
|
198
|
-
<Label variant="outline" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
199
|
-
Grey icon removable
|
|
200
|
-
</Label>{' '}
|
|
201
|
-
<Label variant="outline" href="#outline">
|
|
202
|
-
Grey link
|
|
203
|
-
</Label>{' '}
|
|
204
|
-
<Label variant="outline" href="#outline" onClose={Function.prototype}>
|
|
205
|
-
Grey link removable
|
|
206
|
-
</Label>
|
|
207
|
-
<Label variant="outline" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
208
|
-
Grey label with icon that overflows
|
|
209
|
-
</Label>
|
|
210
|
-
<br />
|
|
211
|
-
<br />
|
|
212
|
-
<Label variant="outline" color="blue">
|
|
213
|
-
Blue
|
|
214
|
-
</Label>{' '}
|
|
215
|
-
<Label variant="outline" color="blue" icon={<InfoCircleIcon />}>
|
|
216
|
-
Blue icon
|
|
217
|
-
</Label>{' '}
|
|
218
|
-
<Label variant="outline" color="blue" onClose={Function.prototype}>
|
|
219
|
-
Blue removable
|
|
220
|
-
</Label>{' '}
|
|
221
|
-
<Label variant="outline" color="blue" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
222
|
-
Blue icon removable
|
|
223
|
-
</Label>{' '}
|
|
224
|
-
<Label variant="outline" color="blue" href="#outline">
|
|
225
|
-
Blue link
|
|
226
|
-
</Label>{' '}
|
|
227
|
-
<Label variant="outline" color="blue" href="#outline" onClose={Function.prototype}>
|
|
228
|
-
Blue link removable
|
|
229
|
-
</Label>
|
|
230
|
-
<Label variant="outline" color="blue" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
231
|
-
Blue label with icon that overflows
|
|
232
|
-
</Label>
|
|
233
|
-
<br />
|
|
234
|
-
<br />
|
|
235
|
-
<Label variant="outline" color="green">
|
|
236
|
-
Green
|
|
237
|
-
</Label>{' '}
|
|
238
|
-
<Label variant="outline" color="green" icon={<InfoCircleIcon />}>
|
|
239
|
-
Green icon
|
|
240
|
-
</Label>{' '}
|
|
241
|
-
<Label variant="outline" color="green" onClose={Function.prototype}>
|
|
242
|
-
Green removable
|
|
243
|
-
</Label>{' '}
|
|
244
|
-
<Label variant="outline" color="green" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
245
|
-
Green icon removable
|
|
246
|
-
</Label>{' '}
|
|
247
|
-
<Label variant="outline" color="green" href="#outline">
|
|
248
|
-
Green link
|
|
249
|
-
</Label>{' '}
|
|
250
|
-
<Label variant="outline" color="green" href="#outline" onClose={Function.prototype}>
|
|
251
|
-
Green link removable
|
|
252
|
-
</Label>
|
|
253
|
-
<Label variant="outline" color="green" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
254
|
-
Green label with icon that overflows
|
|
255
|
-
</Label>
|
|
256
|
-
<br />
|
|
257
|
-
<br />
|
|
258
|
-
<Label variant="outline" color="orange">
|
|
259
|
-
Orange
|
|
260
|
-
</Label>{' '}
|
|
261
|
-
<Label variant="outline" color="orange" icon={<InfoCircleIcon />}>
|
|
262
|
-
Orange icon
|
|
263
|
-
</Label>{' '}
|
|
264
|
-
<Label variant="outline" color="orange" onClose={Function.prototype}>
|
|
265
|
-
Orange removable
|
|
266
|
-
</Label>{' '}
|
|
267
|
-
<Label variant="outline" color="orange" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
268
|
-
Orange icon removable
|
|
269
|
-
</Label>{' '}
|
|
270
|
-
<Label variant="outline" color="orange" href="#outline">
|
|
271
|
-
Orange link
|
|
272
|
-
</Label>{' '}
|
|
273
|
-
<Label variant="outline" color="orange" href="#outline" onClose={Function.prototype}>
|
|
274
|
-
Orange link removable
|
|
275
|
-
</Label>
|
|
276
|
-
<Label variant="outline" color="orange" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
277
|
-
Orange label with icon that overflows
|
|
278
|
-
</Label>
|
|
279
|
-
<br />
|
|
280
|
-
<br />
|
|
281
|
-
<Label variant="outline" color="red">
|
|
282
|
-
Red
|
|
283
|
-
</Label>{' '}
|
|
284
|
-
<Label variant="outline" color="red" icon={<InfoCircleIcon />}>
|
|
285
|
-
Red icon
|
|
286
|
-
</Label>{' '}
|
|
287
|
-
<Label variant="outline" color="red" onClose={Function.prototype}>
|
|
288
|
-
Red removable
|
|
289
|
-
</Label>{' '}
|
|
290
|
-
<Label variant="outline" color="red" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
291
|
-
Red icon removable
|
|
292
|
-
</Label>{' '}
|
|
293
|
-
<Label variant="outline" color="red" href="#outline">
|
|
294
|
-
Red link
|
|
295
|
-
</Label>{' '}
|
|
296
|
-
<Label variant="outline" color="red" href="#outline" onClose={Function.prototype}>
|
|
297
|
-
Red link removable
|
|
298
|
-
</Label>
|
|
299
|
-
<Label variant="outline" color="red" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
300
|
-
Red label with icon that overflows
|
|
301
|
-
</Label>
|
|
302
|
-
<br />
|
|
303
|
-
<br />
|
|
304
|
-
<Label variant="outline" color="purple">
|
|
305
|
-
Purple
|
|
306
|
-
</Label>{' '}
|
|
307
|
-
<Label variant="outline" color="purple" icon={<InfoCircleIcon />}>
|
|
308
|
-
Purple icon
|
|
309
|
-
</Label>{' '}
|
|
310
|
-
<Label variant="outline" color="purple" onClose={Function.prototype}>
|
|
311
|
-
Purple removable
|
|
312
|
-
</Label>{' '}
|
|
313
|
-
<Label variant="outline" color="purple" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
314
|
-
Purple icon removable
|
|
315
|
-
</Label>{' '}
|
|
316
|
-
<Label variant="outline" color="purple" href="#outline">
|
|
317
|
-
Purple link
|
|
318
|
-
</Label>{' '}
|
|
319
|
-
<Label variant="outline" color="purple" href="#outline" onClose={Function.prototype}>
|
|
320
|
-
Purple link removable
|
|
321
|
-
</Label>
|
|
322
|
-
<Label variant="outline" color="purple" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
323
|
-
Purple label with icon that overflows
|
|
324
|
-
</Label>
|
|
325
|
-
<br />
|
|
326
|
-
<br />
|
|
327
|
-
<Label variant="outline" color="cyan">
|
|
328
|
-
Cyan
|
|
329
|
-
</Label>{' '}
|
|
330
|
-
<Label variant="outline" color="cyan" icon={<InfoCircleIcon />}>
|
|
331
|
-
Cyan icon
|
|
332
|
-
</Label>{' '}
|
|
333
|
-
<Label variant="outline" color="cyan" onClose={Function.prototype}>
|
|
334
|
-
Cyan removable
|
|
335
|
-
</Label>{' '}
|
|
336
|
-
<Label variant="outline" color="cyan" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
337
|
-
Cyan icon removable
|
|
338
|
-
</Label>{' '}
|
|
339
|
-
<Label variant="outline" color="cyan" href="#outline">
|
|
340
|
-
Cyan link
|
|
341
|
-
</Label>{' '}
|
|
342
|
-
<Label variant="outline" color="cyan" href="#outline" onClose={Function.prototype}>
|
|
343
|
-
Cyan link removable
|
|
344
|
-
</Label>
|
|
345
|
-
<Label variant="outline" color="cyan" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
346
|
-
Cyan label with icon that overflows
|
|
347
|
-
</Label>
|
|
348
|
-
<br />
|
|
349
|
-
<br />
|
|
350
|
-
<Label variant="outline" color="gold">
|
|
351
|
-
Gold
|
|
352
|
-
</Label>{' '}
|
|
353
|
-
<Label variant="outline" color="gold" icon={<InfoCircleIcon />}>
|
|
354
|
-
Gold icon
|
|
355
|
-
</Label>{' '}
|
|
356
|
-
<Label variant="outline" color="gold" onClose={Function.prototype}>
|
|
357
|
-
Gold removable
|
|
358
|
-
</Label>{' '}
|
|
359
|
-
<Label variant="outline" color="gold" icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
360
|
-
Gold icon removable
|
|
361
|
-
</Label>{' '}
|
|
362
|
-
<Label variant="outline" color="gold" href="#outline">
|
|
363
|
-
Gold link
|
|
364
|
-
</Label>{' '}
|
|
365
|
-
<Label variant="outline" color="gold" href="#outline" onClose={Function.prototype}>
|
|
366
|
-
Gold link removable
|
|
367
|
-
</Label>
|
|
368
|
-
<Label variant="outline" color="gold" icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
369
|
-
Gold label with icon that overflows
|
|
370
|
-
</Label>
|
|
371
|
-
</React.Fragment>;
|
|
20
|
+
```ts file="LabelOutline.tsx"
|
|
372
21
|
```
|
|
373
22
|
|
|
374
23
|
### Compact
|
|
375
24
|
|
|
376
|
-
```
|
|
377
|
-
import React from 'react';
|
|
378
|
-
import { Label } from '@patternfly/react-core';
|
|
379
|
-
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
380
|
-
|
|
381
|
-
<React.Fragment>
|
|
382
|
-
<Label isCompact>Grey</Label>{' '}
|
|
383
|
-
<Label isCompact icon={<InfoCircleIcon />}>
|
|
384
|
-
Compact icon
|
|
385
|
-
</Label>{' '}
|
|
386
|
-
<Label isCompact onClose={Function.prototype}>
|
|
387
|
-
Compact removable
|
|
388
|
-
</Label>{' '}
|
|
389
|
-
<Label isCompact icon={<InfoCircleIcon />} onClose={Function.prototype}>
|
|
390
|
-
Compact icon removable
|
|
391
|
-
</Label>{' '}
|
|
392
|
-
<Label isCompact href="#outline">
|
|
393
|
-
Compact link
|
|
394
|
-
</Label>{' '}
|
|
395
|
-
<Label isCompact href="#outline" onClose={Function.prototype}>
|
|
396
|
-
Compact link removable
|
|
397
|
-
</Label>
|
|
398
|
-
<Label isCompact icon={<InfoCircleIcon />} onClose={Function.prototype} isTruncated>
|
|
399
|
-
Compact label with icon that overflows
|
|
400
|
-
</Label>
|
|
401
|
-
</React.Fragment>;
|
|
25
|
+
```ts file="LabelCompact.tsx"
|
|
402
26
|
```
|
|
403
27
|
|
|
404
28
|
### Router link
|
|
405
29
|
|
|
406
|
-
```
|
|
407
|
-
import React from 'react';
|
|
408
|
-
import { Label } from '@patternfly/react-core';
|
|
409
|
-
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
410
|
-
import { Link } from '@reach/router';
|
|
411
|
-
|
|
412
|
-
<Label
|
|
413
|
-
color="blue"
|
|
414
|
-
icon={<InfoCircleIcon />}
|
|
415
|
-
onClose={Function.prototype}
|
|
416
|
-
isTruncated
|
|
417
|
-
render={({ className, content, componentRef }) => (
|
|
418
|
-
<Link to="/" className={className} innerRef={componentRef}>
|
|
419
|
-
{content}
|
|
420
|
-
</Link>
|
|
421
|
-
)}
|
|
422
|
-
>
|
|
423
|
-
Blue label router link with icon that overflows
|
|
424
|
-
</Label>;
|
|
30
|
+
```ts file="LabelRouterLink.tsx"
|
|
425
31
|
```
|
|
426
32
|
|
|
427
33
|
### Editable
|
|
@@ -430,5 +36,5 @@ Click or press either enter or space to begin editing a label. After editing, cl
|
|
|
430
36
|
|
|
431
37
|
You can also customize any Label's close button aria-label as this example shows with `closeBtnAriaLabel`.
|
|
432
38
|
|
|
433
|
-
```
|
|
39
|
+
```ts file="LabelEditable.tsx" isBeta
|
|
434
40
|
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Label } from '@patternfly/react-core';
|
|
3
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
4
|
+
|
|
5
|
+
export const LabelCompact: React.FunctionComponent = () => (
|
|
6
|
+
<React.Fragment>
|
|
7
|
+
<Label isCompact>Grey</Label>{' '}
|
|
8
|
+
<Label isCompact icon={<InfoCircleIcon />}>
|
|
9
|
+
Compact icon
|
|
10
|
+
</Label>{' '}
|
|
11
|
+
<Label isCompact onClose={() => Function.prototype}>
|
|
12
|
+
Compact removable
|
|
13
|
+
</Label>{' '}
|
|
14
|
+
<Label isCompact icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
15
|
+
Compact icon removable
|
|
16
|
+
</Label>{' '}
|
|
17
|
+
<Label isCompact href="#outline">
|
|
18
|
+
Compact link
|
|
19
|
+
</Label>{' '}
|
|
20
|
+
<Label isCompact href="#outline" onClose={() => Function.prototype}>
|
|
21
|
+
Compact link removable
|
|
22
|
+
</Label>
|
|
23
|
+
<Label isCompact icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
24
|
+
Compact label with icon that overflows
|
|
25
|
+
</Label>
|
|
26
|
+
</React.Fragment>
|
|
27
|
+
);
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Label } from '@patternfly/react-core';
|
|
3
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
4
|
+
|
|
5
|
+
export const LabelFilled: React.FunctionComponent = () => (
|
|
6
|
+
<React.Fragment>
|
|
7
|
+
<Label>Grey</Label> <Label icon={<InfoCircleIcon />}>Grey icon</Label>{' '}
|
|
8
|
+
<Label onClose={() => Function.prototype}>Grey removable</Label>{' '}
|
|
9
|
+
<Label icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
10
|
+
Grey icon removable
|
|
11
|
+
</Label>{' '}
|
|
12
|
+
<Label href="#filled">Grey link</Label>{' '}
|
|
13
|
+
<Label href="#filled" onClose={() => Function.prototype}>
|
|
14
|
+
Grey link removable
|
|
15
|
+
</Label>
|
|
16
|
+
<Label icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
17
|
+
Grey label with icon that overflows
|
|
18
|
+
</Label>
|
|
19
|
+
<br />
|
|
20
|
+
<br />
|
|
21
|
+
<Label color="blue">Blue</Label>{' '}
|
|
22
|
+
<Label color="blue" icon={<InfoCircleIcon />}>
|
|
23
|
+
Blue icon
|
|
24
|
+
</Label>{' '}
|
|
25
|
+
<Label color="blue" onClose={() => Function.prototype}>
|
|
26
|
+
Blue removable
|
|
27
|
+
</Label>{' '}
|
|
28
|
+
<Label color="blue" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
29
|
+
Blue icon removable
|
|
30
|
+
</Label>{' '}
|
|
31
|
+
<Label color="blue" href="#filled">
|
|
32
|
+
Blue link
|
|
33
|
+
</Label>{' '}
|
|
34
|
+
<Label color="blue" href="#filled" onClose={() => Function.prototype}>
|
|
35
|
+
Blue link removable
|
|
36
|
+
</Label>
|
|
37
|
+
<Label color="blue" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
38
|
+
Blue label with icon that overflows
|
|
39
|
+
</Label>
|
|
40
|
+
<br />
|
|
41
|
+
<br />
|
|
42
|
+
<Label color="green">Green</Label>{' '}
|
|
43
|
+
<Label color="green" icon={<InfoCircleIcon />}>
|
|
44
|
+
Green icon
|
|
45
|
+
</Label>{' '}
|
|
46
|
+
<Label color="green" onClose={() => Function.prototype}>
|
|
47
|
+
Green removable
|
|
48
|
+
</Label>{' '}
|
|
49
|
+
<Label color="green" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
50
|
+
Green icon removable
|
|
51
|
+
</Label>{' '}
|
|
52
|
+
<Label color="green" href="#filled">
|
|
53
|
+
Green link
|
|
54
|
+
</Label>{' '}
|
|
55
|
+
<Label color="green" href="#filled" onClose={() => Function.prototype}>
|
|
56
|
+
Green link removable
|
|
57
|
+
</Label>
|
|
58
|
+
<Label color="green" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
59
|
+
Green label with icon that overflows
|
|
60
|
+
</Label>
|
|
61
|
+
<br />
|
|
62
|
+
<br />
|
|
63
|
+
<Label color="orange">Orange</Label>{' '}
|
|
64
|
+
<Label color="orange" icon={<InfoCircleIcon />}>
|
|
65
|
+
Orange icon
|
|
66
|
+
</Label>{' '}
|
|
67
|
+
<Label color="orange" onClose={() => Function.prototype}>
|
|
68
|
+
Orange removable
|
|
69
|
+
</Label>{' '}
|
|
70
|
+
<Label color="orange" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
71
|
+
Orange icon removable
|
|
72
|
+
</Label>{' '}
|
|
73
|
+
<Label color="orange" href="#filled">
|
|
74
|
+
Orange link
|
|
75
|
+
</Label>{' '}
|
|
76
|
+
<Label color="orange" href="#filled" onClose={() => Function.prototype}>
|
|
77
|
+
Orange link removable
|
|
78
|
+
</Label>
|
|
79
|
+
<Label color="orange" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
80
|
+
Orange label with icon that overflows
|
|
81
|
+
</Label>
|
|
82
|
+
<br />
|
|
83
|
+
<br />
|
|
84
|
+
<Label color="red">Red</Label>{' '}
|
|
85
|
+
<Label color="red" icon={<InfoCircleIcon />}>
|
|
86
|
+
Red icon
|
|
87
|
+
</Label>{' '}
|
|
88
|
+
<Label color="red" onClose={() => Function.prototype}>
|
|
89
|
+
Red removable
|
|
90
|
+
</Label>{' '}
|
|
91
|
+
<Label color="red" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
92
|
+
Red icon removable
|
|
93
|
+
</Label>{' '}
|
|
94
|
+
<Label color="red" href="#filled">
|
|
95
|
+
Red link
|
|
96
|
+
</Label>{' '}
|
|
97
|
+
<Label color="red" href="#filled" onClose={() => Function.prototype}>
|
|
98
|
+
Red link removable
|
|
99
|
+
</Label>
|
|
100
|
+
<Label color="red" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
101
|
+
Red label with icon that overflows
|
|
102
|
+
</Label>
|
|
103
|
+
<br />
|
|
104
|
+
<br />
|
|
105
|
+
<Label color="purple">Purple</Label>{' '}
|
|
106
|
+
<Label color="purple" icon={<InfoCircleIcon />}>
|
|
107
|
+
Purple icon
|
|
108
|
+
</Label>{' '}
|
|
109
|
+
<Label color="purple" onClose={() => Function.prototype}>
|
|
110
|
+
Purple removable
|
|
111
|
+
</Label>{' '}
|
|
112
|
+
<Label color="purple" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
113
|
+
Purple icon removable
|
|
114
|
+
</Label>{' '}
|
|
115
|
+
<Label color="purple" href="#filled">
|
|
116
|
+
Purple link
|
|
117
|
+
</Label>{' '}
|
|
118
|
+
<Label color="purple" href="#filled" onClose={() => Function.prototype}>
|
|
119
|
+
Purple link removable
|
|
120
|
+
</Label>
|
|
121
|
+
<Label color="purple" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
122
|
+
Purple label with icon that overflows
|
|
123
|
+
</Label>
|
|
124
|
+
<br />
|
|
125
|
+
<br />
|
|
126
|
+
<Label color="cyan">Cyan</Label>{' '}
|
|
127
|
+
<Label color="cyan" icon={<InfoCircleIcon />}>
|
|
128
|
+
Cyan icon
|
|
129
|
+
</Label>{' '}
|
|
130
|
+
<Label color="cyan" onClose={() => Function.prototype}>
|
|
131
|
+
Cyan removable
|
|
132
|
+
</Label>{' '}
|
|
133
|
+
<Label color="cyan" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
134
|
+
Cyan icon removable
|
|
135
|
+
</Label>{' '}
|
|
136
|
+
<Label color="cyan" href="#filled">
|
|
137
|
+
Cyan link
|
|
138
|
+
</Label>{' '}
|
|
139
|
+
<Label color="cyan" href="#filled" onClose={() => Function.prototype}>
|
|
140
|
+
Cyan link removable
|
|
141
|
+
</Label>
|
|
142
|
+
<Label color="cyan" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
143
|
+
Cyan label with icon that overflows
|
|
144
|
+
</Label>
|
|
145
|
+
<br />
|
|
146
|
+
<br />
|
|
147
|
+
<Label color="gold">Gold</Label>{' '}
|
|
148
|
+
<Label color="gold" icon={<InfoCircleIcon />}>
|
|
149
|
+
Gold icon
|
|
150
|
+
</Label>{' '}
|
|
151
|
+
<Label color="gold" onClose={() => Function.prototype}>
|
|
152
|
+
Gold removable
|
|
153
|
+
</Label>{' '}
|
|
154
|
+
<Label color="gold" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
155
|
+
Gold icon removable
|
|
156
|
+
</Label>{' '}
|
|
157
|
+
<Label color="gold" href="#filled">
|
|
158
|
+
Gold link
|
|
159
|
+
</Label>{' '}
|
|
160
|
+
<Label color="gold" href="#filled" onClose={() => Function.prototype}>
|
|
161
|
+
Gold link removable
|
|
162
|
+
</Label>
|
|
163
|
+
<Label color="gold" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
164
|
+
Gold label with icon that overflows
|
|
165
|
+
</Label>
|
|
166
|
+
</React.Fragment>
|
|
167
|
+
);
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Label } from '@patternfly/react-core';
|
|
3
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
4
|
+
|
|
5
|
+
export const LabelOutline: React.FunctionComponent = () => (
|
|
6
|
+
<React.Fragment>
|
|
7
|
+
<Label variant="outline">Grey</Label>{' '}
|
|
8
|
+
<Label variant="outline" icon={<InfoCircleIcon />}>
|
|
9
|
+
Grey icon
|
|
10
|
+
</Label>{' '}
|
|
11
|
+
<Label variant="outline" onClose={() => Function.prototype}>
|
|
12
|
+
Grey removable
|
|
13
|
+
</Label>{' '}
|
|
14
|
+
<Label variant="outline" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
15
|
+
Grey icon removable
|
|
16
|
+
</Label>{' '}
|
|
17
|
+
<Label variant="outline" href="#outline">
|
|
18
|
+
Grey link
|
|
19
|
+
</Label>{' '}
|
|
20
|
+
<Label variant="outline" href="#outline" onClose={() => Function.prototype}>
|
|
21
|
+
Grey link removable
|
|
22
|
+
</Label>
|
|
23
|
+
<Label variant="outline" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
24
|
+
Grey label with icon that overflows
|
|
25
|
+
</Label>
|
|
26
|
+
<br />
|
|
27
|
+
<br />
|
|
28
|
+
<Label variant="outline" color="blue">
|
|
29
|
+
Blue
|
|
30
|
+
</Label>{' '}
|
|
31
|
+
<Label variant="outline" color="blue" icon={<InfoCircleIcon />}>
|
|
32
|
+
Blue icon
|
|
33
|
+
</Label>{' '}
|
|
34
|
+
<Label variant="outline" color="blue" onClose={() => Function.prototype}>
|
|
35
|
+
Blue removable
|
|
36
|
+
</Label>{' '}
|
|
37
|
+
<Label variant="outline" color="blue" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
38
|
+
Blue icon removable
|
|
39
|
+
</Label>{' '}
|
|
40
|
+
<Label variant="outline" color="blue" href="#outline">
|
|
41
|
+
Blue link
|
|
42
|
+
</Label>{' '}
|
|
43
|
+
<Label variant="outline" color="blue" href="#outline" onClose={() => Function.prototype}>
|
|
44
|
+
Blue link removable
|
|
45
|
+
</Label>
|
|
46
|
+
<Label variant="outline" color="blue" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
47
|
+
Blue label with icon that overflows
|
|
48
|
+
</Label>
|
|
49
|
+
<br />
|
|
50
|
+
<br />
|
|
51
|
+
<Label variant="outline" color="green">
|
|
52
|
+
Green
|
|
53
|
+
</Label>{' '}
|
|
54
|
+
<Label variant="outline" color="green" icon={<InfoCircleIcon />}>
|
|
55
|
+
Green icon
|
|
56
|
+
</Label>{' '}
|
|
57
|
+
<Label variant="outline" color="green" onClose={() => Function.prototype}>
|
|
58
|
+
Green removable
|
|
59
|
+
</Label>{' '}
|
|
60
|
+
<Label variant="outline" color="green" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
61
|
+
Green icon removable
|
|
62
|
+
</Label>{' '}
|
|
63
|
+
<Label variant="outline" color="green" href="#outline">
|
|
64
|
+
Green link
|
|
65
|
+
</Label>{' '}
|
|
66
|
+
<Label variant="outline" color="green" href="#outline" onClose={() => Function.prototype}>
|
|
67
|
+
Green link removable
|
|
68
|
+
</Label>
|
|
69
|
+
<Label variant="outline" color="green" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
70
|
+
Green label with icon that overflows
|
|
71
|
+
</Label>
|
|
72
|
+
<br />
|
|
73
|
+
<br />
|
|
74
|
+
<Label variant="outline" color="orange">
|
|
75
|
+
Orange
|
|
76
|
+
</Label>{' '}
|
|
77
|
+
<Label variant="outline" color="orange" icon={<InfoCircleIcon />}>
|
|
78
|
+
Orange icon
|
|
79
|
+
</Label>{' '}
|
|
80
|
+
<Label variant="outline" color="orange" onClose={() => Function.prototype}>
|
|
81
|
+
Orange removable
|
|
82
|
+
</Label>{' '}
|
|
83
|
+
<Label variant="outline" color="orange" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
84
|
+
Orange icon removable
|
|
85
|
+
</Label>{' '}
|
|
86
|
+
<Label variant="outline" color="orange" href="#outline">
|
|
87
|
+
Orange link
|
|
88
|
+
</Label>{' '}
|
|
89
|
+
<Label variant="outline" color="orange" href="#outline" onClose={() => Function.prototype}>
|
|
90
|
+
Orange link removable
|
|
91
|
+
</Label>
|
|
92
|
+
<Label variant="outline" color="orange" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
93
|
+
Orange label with icon that overflows
|
|
94
|
+
</Label>
|
|
95
|
+
<br />
|
|
96
|
+
<br />
|
|
97
|
+
<Label variant="outline" color="red">
|
|
98
|
+
Red
|
|
99
|
+
</Label>{' '}
|
|
100
|
+
<Label variant="outline" color="red" icon={<InfoCircleIcon />}>
|
|
101
|
+
Red icon
|
|
102
|
+
</Label>{' '}
|
|
103
|
+
<Label variant="outline" color="red" onClose={() => Function.prototype}>
|
|
104
|
+
Red removable
|
|
105
|
+
</Label>{' '}
|
|
106
|
+
<Label variant="outline" color="red" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
107
|
+
Red icon removable
|
|
108
|
+
</Label>{' '}
|
|
109
|
+
<Label variant="outline" color="red" href="#outline">
|
|
110
|
+
Red link
|
|
111
|
+
</Label>{' '}
|
|
112
|
+
<Label variant="outline" color="red" href="#outline" onClose={() => Function.prototype}>
|
|
113
|
+
Red link removable
|
|
114
|
+
</Label>
|
|
115
|
+
<Label variant="outline" color="red" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
116
|
+
Red label with icon that overflows
|
|
117
|
+
</Label>
|
|
118
|
+
<br />
|
|
119
|
+
<br />
|
|
120
|
+
<Label variant="outline" color="purple">
|
|
121
|
+
Purple
|
|
122
|
+
</Label>{' '}
|
|
123
|
+
<Label variant="outline" color="purple" icon={<InfoCircleIcon />}>
|
|
124
|
+
Purple icon
|
|
125
|
+
</Label>{' '}
|
|
126
|
+
<Label variant="outline" color="purple" onClose={() => Function.prototype}>
|
|
127
|
+
Purple removable
|
|
128
|
+
</Label>{' '}
|
|
129
|
+
<Label variant="outline" color="purple" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
130
|
+
Purple icon removable
|
|
131
|
+
</Label>{' '}
|
|
132
|
+
<Label variant="outline" color="purple" href="#outline">
|
|
133
|
+
Purple link
|
|
134
|
+
</Label>{' '}
|
|
135
|
+
<Label variant="outline" color="purple" href="#outline" onClose={() => Function.prototype}>
|
|
136
|
+
Purple link removable
|
|
137
|
+
</Label>
|
|
138
|
+
<Label variant="outline" color="purple" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
139
|
+
Purple label with icon that overflows
|
|
140
|
+
</Label>
|
|
141
|
+
<br />
|
|
142
|
+
<br />
|
|
143
|
+
<Label variant="outline" color="cyan">
|
|
144
|
+
Cyan
|
|
145
|
+
</Label>{' '}
|
|
146
|
+
<Label variant="outline" color="cyan" icon={<InfoCircleIcon />}>
|
|
147
|
+
Cyan icon
|
|
148
|
+
</Label>{' '}
|
|
149
|
+
<Label variant="outline" color="cyan" onClose={() => Function.prototype}>
|
|
150
|
+
Cyan removable
|
|
151
|
+
</Label>{' '}
|
|
152
|
+
<Label variant="outline" color="cyan" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
153
|
+
Cyan icon removable
|
|
154
|
+
</Label>{' '}
|
|
155
|
+
<Label variant="outline" color="cyan" href="#outline">
|
|
156
|
+
Cyan link
|
|
157
|
+
</Label>{' '}
|
|
158
|
+
<Label variant="outline" color="cyan" href="#outline" onClose={() => Function.prototype}>
|
|
159
|
+
Cyan link removable
|
|
160
|
+
</Label>
|
|
161
|
+
<Label variant="outline" color="cyan" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
162
|
+
Cyan label with icon that overflows
|
|
163
|
+
</Label>
|
|
164
|
+
<br />
|
|
165
|
+
<br />
|
|
166
|
+
<Label variant="outline" color="gold">
|
|
167
|
+
Gold
|
|
168
|
+
</Label>{' '}
|
|
169
|
+
<Label variant="outline" color="gold" icon={<InfoCircleIcon />}>
|
|
170
|
+
Gold icon
|
|
171
|
+
</Label>{' '}
|
|
172
|
+
<Label variant="outline" color="gold" onClose={() => Function.prototype}>
|
|
173
|
+
Gold removable
|
|
174
|
+
</Label>{' '}
|
|
175
|
+
<Label variant="outline" color="gold" icon={<InfoCircleIcon />} onClose={() => Function.prototype}>
|
|
176
|
+
Gold icon removable
|
|
177
|
+
</Label>{' '}
|
|
178
|
+
<Label variant="outline" color="gold" href="#outline">
|
|
179
|
+
Gold link
|
|
180
|
+
</Label>{' '}
|
|
181
|
+
<Label variant="outline" color="gold" href="#outline" onClose={() => Function.prototype}>
|
|
182
|
+
Gold link removable
|
|
183
|
+
</Label>
|
|
184
|
+
<Label variant="outline" color="gold" icon={<InfoCircleIcon />} onClose={() => Function.prototype} isTruncated>
|
|
185
|
+
Gold label with icon that overflows
|
|
186
|
+
</Label>
|
|
187
|
+
</React.Fragment>
|
|
188
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Label } from '@patternfly/react-core';
|
|
3
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/esm/icons/info-circle-icon';
|
|
4
|
+
import { Link } from '@reach/router';
|
|
5
|
+
|
|
6
|
+
export const LabelRouterLink: React.FunctionComponent = () => (
|
|
7
|
+
<Label
|
|
8
|
+
color="blue"
|
|
9
|
+
icon={<InfoCircleIcon />}
|
|
10
|
+
onClose={() => Function.prototype}
|
|
11
|
+
isTruncated
|
|
12
|
+
render={({ className, content, componentRef }) => (
|
|
13
|
+
<Link to="/" className={className} innerRef={componentRef}>
|
|
14
|
+
{content}
|
|
15
|
+
</Link>
|
|
16
|
+
)}
|
|
17
|
+
>
|
|
18
|
+
Blue label router link with icon that overflows
|
|
19
|
+
</Label>
|
|
20
|
+
);
|