Skip to content

Commit c90b4ff

Browse files
author
Sara Dahan
committed
chore(label-group): separate add-label from label-group
1 parent 642b367 commit c90b4ff

2 files changed

Lines changed: 15 additions & 14 deletions

File tree

elements/pf-label-group/demo/label-group-add-label-custom-form.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@ <h2 slot="category">group name</h2>
33
<pf-label color="red" icon="info-circle" removable>label-1</pf-label>
44
<pf-label color="green" icon="info-circle" removable>label-2</pf-label>
55
<pf-label color="blue" icon="info-circle" removable>label-3</pf-label>
6-
<pf-label id="add-button" class="add-button" color="blue" variant="outline" dismissible="false">
7-
Add label </pf-label>
86
</pf-label-group>
7+
8+
<script type="module">
9+
import '@patternfly/elements/pf-label-group/pf-label-group.js';
10+
import '@patternfly/elements/pf-label/pf-label.js';
11+
import '@patternfly/elements/pf-button/pf-button.js';
12+
import '@patternfly/elements/pf-modal/pf-modal.js';
13+
import '@patternfly/elements/pf-dropdown/pf-dropdown.js';
14+
</script>
15+
16+
17+
<pf-button id="add-button" variant="secondary">
18+
Add label
19+
</pf-button>
20+
921
<pf-modal id="custom-label-modal">
1022
<h2 slot="header">Add label</h2>
1123
<form id="add-label-form">
@@ -60,12 +72,6 @@ <h2 slot="header">Add label</h2>
6072
</pf-modal>
6173

6274
<script type="module">
63-
import '@patternfly/elements/pf-label-group/pf-label-group.js';
64-
import '@patternfly/elements/pf-label/pf-label.js';
65-
import '@patternfly/elements/pf-button/pf-button.js';
66-
import '@patternfly/elements/pf-modal/pf-modal.js';
67-
import '@patternfly/elements/pf-select/pf-select.js';
68-
import '@patternfly/elements/pf-icon/pf-icon.js';
6975

7076
const addButton = document.getElementById('add-button');
7177
const modal = document.getElementById('custom-label-modal');

elements/pf-label-group/demo/label-group-closeable.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
<pf-label-group closeable>
2-
<h2 slot="category">group name</h2>
3-
<pf-label color="red" icon="info-circle" removable>label-1</pf-label>
4-
<pf-label color="green" icon="info-circle" removable>label-2</pf-label>
5-
<pf-label color="blue" icon="info-circle" removable>label-3</pf-label>
6-
</pf-label-group>
1+
ב
72

83
<script type="module">
94
import '@patternfly/elements/pf-label-group/pf-label-group.js';

0 commit comments

Comments
 (0)