File tree Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Expand file tree Collapse file tree 1 file changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,8 @@ export const Tag = memo(
183183 ) }
184184 { linkProps === undefined &&
185185 nativeButtonProps === undefined &&
186- AsTag === "p" && (
187- < p
186+ ( AsTag === "span" || AsTag === "p" ) && (
187+ < AsTag
188188 { ...nativeParagraphOrSpanProps }
189189 id = { id_props ?? nativeParagraphOrSpanProps ?. id ?? id }
190190 className = { cx ( nativeParagraphOrSpanProps ?. className , className ) }
@@ -197,25 +197,7 @@ export const Tag = memo(
197197 { ...rest }
198198 >
199199 { children }
200- </ p >
201- ) }
202- { linkProps === undefined &&
203- nativeButtonProps === undefined &&
204- AsTag === "span" && (
205- < span
206- { ...nativeParagraphOrSpanProps }
207- id = { id_props ?? nativeParagraphOrSpanProps ?. id ?? id }
208- className = { cx ( nativeParagraphOrSpanProps ?. className , className ) }
209- style = { {
210- ...nativeParagraphOrSpanProps ?. style ,
211- ...style
212- } }
213- title = { title ?? nativeParagraphOrSpanProps ?. title }
214- ref = { ref as React . ForwardedRef < HTMLSpanElement > }
215- { ...rest }
216- >
217- { children }
218- </ span >
200+ </ AsTag >
219201 ) }
220202 </ >
221203 ) ;
You can’t perform that action at this time.
0 commit comments