File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ export class UUIIconElement extends LitElement {
26
26
::slotted(svg) {
27
27
fill: var(--uui-icon-color, currentColor);
28
28
}
29
+
30
+ :host-context(div[slot='prepend']) {
31
+ margin-left: var(--uui-size-2, 6px);
32
+ }
33
+
34
+ :host-context(div[slot='append']) {
35
+ margin-right: var(--uui-size-2, 6px);
36
+ }
29
37
` ,
30
38
] ;
31
39
Original file line number Diff line number Diff line change @@ -138,6 +138,42 @@ export const PrependAndAppend: Story = props =>
138
138
</ uui-input >
139
139
` ;
140
140
141
+ export const PrependIcon : Story = props =>
142
+ html ` < uui-input
143
+ .disabled =${ props . disabled }
144
+ .readonly =${ props . readonly }
145
+ .error=${ props . error }
146
+ .label=${ props . label }
147
+ .type=${ props . type }
148
+ .name=${ props . name }
149
+ .placeholder=${ props . placeholder }
150
+ .value=${ props . value } >
151
+ < div slot ="prepend ">
152
+ < uui-icon-registry-essential >
153
+ < uui-icon name ="search "> </ uui-icon >
154
+ </ uui-icon-registry-essential >
155
+ </ div >
156
+ </ uui-input > ` ;
157
+
158
+ export const AppendIcon : Story = props =>
159
+ html ` < uui-input
160
+ .disabled =${ props . disabled }
161
+ .readonly =${ props . readonly }
162
+ .error=${ props . error }
163
+ .label=${ props . label }
164
+ .type=${ props . type }
165
+ .name=${ props . name }
166
+ .placeholder=${ props . placeholder }
167
+ .value=${ props . value } >
168
+ < div
169
+ slot ="append "
170
+ style ="background:#f3f3f3; padding-left:var(--uui-size-2, 6px) ">
171
+ < uui-icon-registry-essential >
172
+ < uui-icon name ="delete "> </ uui-icon >
173
+ </ uui-icon-registry-essential >
174
+ </ div >
175
+ </ uui-input > ` ;
176
+
141
177
export const MultipleInputs : Story = props =>
142
178
html `
143
179
< uui-input
You can’t perform that action at this time.
0 commit comments