-
Notifications
You must be signed in to change notification settings - Fork 907
feat(InputNumber): add option to hide increment/decrement buttons #4805
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: v4
Are you sure you want to change the base?
Conversation
The accept prop did not work with image/* etc.
This reverts commit 5b75835.
The wording in the docs could be improved and also I'm not sure about the prop name some alternatives would be |
commit: |
The accept prop did not work with image/* etc.
This reverts commit 5b75835.
β¦alek/ui into feat/input-number-buttons
@benjamincanac I've addressed #4805 (comment) I am wondering if we could get rid of |
I agree it would be better but this would cause a breaking change π¬ |
showButtons
prop
src/theme/input-number.ts
Outdated
}, { | ||
orientation: 'vertical', | ||
increment: false, | ||
decrement: false, | ||
class: 'pe-2.5' | ||
}, { | ||
orientation: 'horizontal', | ||
increment: false, | ||
decrement: false, | ||
class: 'px-2.5 text-start' | ||
}], |
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.
This is incorrect because it depends on the size
, on horizontal orientation the padding should depend on increment / decrement for right and left independently. Do we really need to reset this 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.
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.
I guess we need to play with increment: false
and decrement: false
in the actual compoundVariants
to not add the px-*
or pe-*
instead.
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.
I've pushed the changes, Its kinda long and might be confusing tho, but I was able to achieve the same look for both orientations this way.
we could simplify it by removing this part d0b66d9#diff-6fe3c9038bd5faf484a683d874590e0f317c7027cca6f9d6451b7d67efb73b58R100-R124 , but then the inputs would have different widths:
β¦into feat/input-number-buttons
}, { | ||
orientation: 'horizontal', | ||
size: 'md', | ||
decrement: true, |
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.
@J-Michalek If decrement
is false but increment
is true we still need some padding. We need to split those px-*
into individual ps-*
and pe-*
I think.
π Linked issue
Resolves: #4718
β Type of change
π Description
I added a new props
showButtons
that add the option to hide the buttons.π Checklist