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

SSR Components missing default size="1em" #69

Closed
theo-staizen opened this issue Oct 3, 2023 · 0 comments · Fixed by #72
Closed

SSR Components missing default size="1em" #69

theo-staizen opened this issue Oct 3, 2023 · 0 comments · Fixed by #72

Comments

@theo-staizen
Copy link
Contributor

theo-staizen commented Oct 3, 2023

TL;DR: I believe the following line of code should change from size, to size = "1em",
https://github.com/phosphor-icons/react/blob/master/src/lib/SSRBase.tsx#L12


A very common pattern is that we have, is that we want our icons to follow the text font size, which works great for client components, since their width/height defaults to 1em. For example (using tailwind classes)

<a className="text-2xl" href="/docs">
  <ArrowRight />
  Go to Documentation
</a>

This does not work as expected for SSR components, because by default, they do not have width/height set to 1em.

I understand that the components fom dist/ssr are not using React Context, but we should still have the same sensible defaults even for SSR (something that we have for color and weight), but just not be able to change them, because we cant use context.

@theo-staizen theo-staizen changed the title SSR Components missing default width="1em" height="1em" SSR Components missing default size="1em" Oct 3, 2023
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

Successfully merging a pull request may close this issue.

1 participant