@@ -176,24 +176,38 @@ export const Tag = memo(
176
176
{ children }
177
177
</ button >
178
178
) }
179
- { linkProps === undefined &&
180
- nativeButtonProps === undefined &&
181
- ( AsTag === "span" || AsTag === "p" ) && (
182
- < AsTag
183
- { ...nativeParagraphOrSpanProps }
184
- id = { id_props ?? nativeParagraphOrSpanProps ?. id ?? id }
185
- className = { cx ( nativeParagraphOrSpanProps ?. className , className ) }
186
- style = { {
187
- ...nativeParagraphOrSpanProps ?. style ,
188
- ...style
189
- } }
190
- title = { title ?? nativeParagraphOrSpanProps ?. title }
191
- ref = { ref as React . ForwardedRef < HTMLParagraphElement > }
192
- { ...rest }
193
- >
194
- { children }
195
- </ AsTag >
196
- ) }
179
+ { linkProps === undefined && nativeButtonProps === undefined && AsTag === "p" && (
180
+ < p
181
+ { ...nativeParagraphOrSpanProps }
182
+ id = { id_props ?? nativeParagraphOrSpanProps ?. id ?? id }
183
+ className = { cx ( nativeParagraphOrSpanProps ?. className , className ) }
184
+ style = { {
185
+ ...nativeParagraphOrSpanProps ?. style ,
186
+ ...style
187
+ } }
188
+ title = { title ?? nativeParagraphOrSpanProps ?. title }
189
+ ref = { ref as React . ForwardedRef < HTMLParagraphElement > }
190
+ { ...rest }
191
+ >
192
+ { children }
193
+ </ p >
194
+ ) }
195
+ { linkProps === undefined && nativeButtonProps === undefined && AsTag === "span" && (
196
+ < span
197
+ { ...nativeParagraphOrSpanProps }
198
+ id = { id_props ?? nativeParagraphOrSpanProps ?. id ?? id }
199
+ className = { cx ( nativeParagraphOrSpanProps ?. className , className ) }
200
+ style = { {
201
+ ...nativeParagraphOrSpanProps ?. style ,
202
+ ...style
203
+ } }
204
+ title = { title ?? nativeParagraphOrSpanProps ?. title }
205
+ ref = { ref as React . ForwardedRef < HTMLSpanElement > }
206
+ { ...rest }
207
+ >
208
+ { children }
209
+ </ span >
210
+ ) }
197
211
</ >
198
212
) ;
199
213
} )
0 commit comments