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

fix(Expandable): Center icon #75

Merged
merged 1 commit into from Apr 4, 2022
Merged

fix(Expandable): Center icon #75

merged 1 commit into from Apr 4, 2022

Conversation

raulsteurer
Copy link
Contributor

Previously, any icon would be aligned to the left top. Only square phosphor-icons with size 80 would appear centered.
This change centers all icons - or really any jsx element provided in the icon prop - vertically and horizontally in the parent div.

Before:
before

After:
after

@vercel
Copy link

vercel bot commented Apr 3, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/treely/boemly/Fm2x5Zm2W2pV9PAMfcof3FBNZmZJ
✅ Preview: https://boemly-git-rs-centericon-treely.vercel.app

@github-actions
Copy link

github-actions bot commented Apr 3, 2022

size-limit report 📦

Path Size
dist/boemly.cjs.production.min.js 1.07 MB (+0.01% 🔺)
dist/boemly.esm.js 206.33 KB (+0.01% 🔺)

src/components/Expandable/Expandable.tsx Outdated Show resolved Hide resolved
src/components/Expandable/Expandable.tsx Outdated Show resolved Hide resolved
Copy link
Member

@lukasbals lukasbals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it work to use the IconButton component?

@lukasbals
Copy link
Member

Would it work to use the IconButton component?

Forget this. I thought the icon in the button on the right is meant. But now I realised that you mean the icon on the left.

Copy link
Member

@lukasbals lukasbals left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@raulsteurer raulsteurer merged commit 66334f4 into main Apr 4, 2022
@raulsteurer raulsteurer deleted the rs/centericon branch April 4, 2022 13:05
@github-actions
Copy link

github-actions bot commented Apr 4, 2022

🎉 This PR is included in version 1.12.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants