-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EuiTextAlign and EuiTextFontFamily components #249
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. How about we combine these two components into a single EuiTextFontFormat
component, which has fontFamily
and align
props? This seems like it will be a bit easier to consume and scale.
or... |
@cjcenizal @uboness Example: <EuiText fontFamily="code" color="danger" textAlign="right">
<p>Hey, I'm some red monospaced text on the right side</p>
</EuiText> We still need a separate component (either separate or an all in one component) for situations where you need to nest styling. <EuiText>
<EuiTextAlign textAlign="center">
<h3>I'm a centered title</h3>
</EuiTextAlign>
<EuiTextColor color="danger">
<p>Hello, I'm red!</p>
</EuiTextColor>
</EuiText> I'm not opposed to wrapping color, family and alignment into an <EuiText>
<EuiTextStyle textAlign="center">
<h3>I'm a centered title</h3>
</EuiTextStyle>
<EuiTextStyle color="danger">
<p>Hello, I'm red!</p>
</EuiTextStyle>
</EuiText> Lemme know if that works more with what you're thinking and I'll adjust the PR. |
@cjcenizal and I chatted about this one quickly and decided to go with the last example making all text style related concerns under a single component separate from
|
Closing in favor of #683 |
Two new components for text manipulation. Similar to
EuiTextColor
these props can also be passed directly ontoEuiText
itself for an all in one solution.