You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now EuiText generates a wrapping <div>. This is problematic when it's a child of a p, which generates console warnings in Kibana (and rightfully so). This occurs somewhat frequently when we have a parent (EUI) component generate a p, but we need to use an EuiText for styling purposes (color, size, general text alignment) inside the p and cannot use it to wrap the component, because the component is a composite. For instance in EuiCard, where description is always wrapped in p:
Describe the solution you'd like
Have EuiText take an optional prop (maybe called element) that can describe a different element than div to circumvent these errors. span seems like a good option.
Describe alternatives you've considered
Changing every wrapping component in EUI to not use p, or to accept its own optional element prop to change a p element. That seems very cumbersome and inexact.
Desired timeline
Soon-ish, it's blocking us from resolving at least some errors in the frontend.
The text was updated successfully, but these errors were encountered:
Adding an addition consideration here -- to make the typing reasonable, we should consider only supporting a subset of options -- p, span, and div, for instance
Is your feature request related to a problem? Please describe.
Right now EuiText generates a wrapping
<div>.
This is problematic when it's a child of ap
, which generates console warnings in Kibana (and rightfully so). This occurs somewhat frequently when we have a parent (EUI) component generate ap
, but we need to use anEuiText
for styling purposes (color, size, general text alignment) inside thep
and cannot use it to wrap the component, because the component is a composite. For instance in EuiCard, where description is always wrapped inp
:Describe the solution you'd like
Have EuiText take an optional prop (maybe called
element
) that can describe a different element thandiv
to circumvent these errors.span
seems like a good option.Describe alternatives you've considered
Changing every wrapping component in EUI to not use
p
, or to accept its own optional element prop to change a p element. That seems very cumbersome and inexact.Desired timeline
Soon-ish, it's blocking us from resolving at least some errors in the frontend.
The text was updated successfully, but these errors were encountered: