-
Notifications
You must be signed in to change notification settings - Fork 732
feat(Badge): add square prop #4008
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
base: v3
Are you sure you want to change the base?
Conversation
@benjamincanac sorry but where am I missing the type definition? |
0d0cc7d
to
6c2f00d
Compare
5ddc938
to
db7a72a
Compare
commit: |
src/theme/badge.ts
Outdated
@@ -36,23 +36,26 @@ export default (options: Required<ModuleOptions>) => ({ | |||
trailingIcon: 'size-3' | |||
}, | |||
md: { | |||
base: 'text-xs px-2 py-1 gap-1 rounded-md', | |||
base: 'text-xs px-2 py-1.5 gap-1 rounded-md', |
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.
Why did you change the theme here? π€
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.
@benjamincanac I did that to have different sizes when the badge is square. But maybe it's better to match the x padding instead of the y ?
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.
The square variant should apply p-1
on md
size in this case.
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.
@benjamincanac sorry I don't understand why, do you want me to reset the size variants to the original values and let the square variant match the y
padding?
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.
Yes exactly, we shouldn't change the default values.
db7a72a
to
621d2fe
Compare
π Linked issue
Resolves #4006
β Type of change
π Description
As said in the linked issue, it would facilitate the use of the
Badge
component when you use only theicon
prop without any label.π Checklist