Skip to content
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

textAlign: "center" not working on second paragraph #209

Open
g-hamilton opened this issue Feb 23, 2024 · 2 comments
Open

textAlign: "center" not working on second paragraph #209

g-hamilton opened this issue Feb 23, 2024 · 2 comments

Comments

@g-hamilton
Copy link

Given the following:

image

I would expect all text to centre align. However, in my Markdown editor, adding this:

image

Results in the component rendering this:

image

The second paragraph should be centre aligned shouldn't it?

PS. I have tried adding paragraph: {textAlign: "center"} to my Markdown styles but that didn't help.

Thanks

@jtvargas
Copy link

jtvargas commented Mar 21, 2024

@g-hamilton Hi I was facing some issues trying to center some text too, and this is how I fixed:

<Markdown
  style={{
    body: {
      ...Typography.FontStyle.SUBHEADING,
      color: Colors.TextPlaceholder,
      includeFontPadding: false,
    },
    textgroup: {
      textAlign: 'center',
    },
    strong: {
      color: Colors.Text,
    },
  }}
>
  {children}
</Markdown>

I added the textgroup style property

@g-hamilton
Copy link
Author

Thanks @jtvargas very helpful 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants