Skip to content

Commit 9136ae3

Browse files
committed
chore: replaced svg with pf-icon
1 parent 88a0a57 commit 9136ae3

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

elements/pf-search-input/pf-search-input.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,13 @@
259259
}
260260

261261
#close-button {
262+
--pf-c-button--PaddingLeft: var(--pf-global--spacer--sm, 0.5rem);
263+
--pf-c-button--PaddingRight: var(--pf-global--spacer--sm, 0.5rem);
264+
--pf-c-button--PaddingTop: var(--pf-global--spacer--xs, 0.25rem);
265+
--pf-c-button--PaddingBottom: var(--pf-global--spacer--xs, 0.25rem);
266+
262267
color: currentColor;
263268
background-color: transparent;
264-
justify-content: flex-end;
265-
padding: var(--pf-global--spacer--sm, 0.5rem);
266269
max-height: 2.25rem;
267270
max-width: 2.25rem;
268271
box-sizing: border-box;
@@ -271,11 +274,11 @@
271274
justify-content: center;
272275
border-radius: 0px;
273276
position: relative;
274-
}
275277

276-
#close-button svg {
277-
position: relative;
278-
top: 3px;
278+
pf-icon {
279+
position: relative;
280+
top: 3px;
281+
}
279282
}
280283

281284
#toggle-text {

elements/pf-search-input/pf-search-input.ts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,7 @@ export class PfSearchInput extends LitElement {
184184
>
185185
<div id="toggle">
186186
<div class="search-icon">
187-
<svg class="pf-v5-svg" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true"
188-
role="img" width="1em" height="1em"><path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3
189-
44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0
190-
6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7
191-
0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"></path></svg>
187+
<pf-icon size="md" icon="search" set="fas">search</pf-icon>
192188
</div>
193189
<input
194190
id="toggle-input"
@@ -202,16 +198,7 @@ export class PfSearchInput extends LitElement {
202198
plain
203199
label="Close"
204200
>
205-
<svg fill="currentColor" height="1em" width="1em" viewBox="0 0 352 512">
206-
<path d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19
207-
0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176
208-
189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48
209-
0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21
210-
356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28
211-
12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28
212-
44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z">
213-
</path>
214-
</svg>
201+
<pf-icon size="md" icon="close" set="patternfly">close</pf-icon>
215202
</pf-button>
216203
<div class="visually-hidden" id="toggle-button"></div>
217204
</div>

0 commit comments

Comments
 (0)