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

feat(VaButton): updated button size props to accept px values #4240

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ahmadJT
Copy link
Contributor

@ahmadJT ahmadJT commented Apr 25, 2024

Description

  • updated button size props to accept px values

Screenshot 2024-04-25 at 19 16 32

closes #4171

Markup:

// Your code

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

@m0ksem m0ksem requested a review from Fsss126 April 26, 2024 14:12
const computedPxSizeStyle = computed(() => {
if (typeof props.size === 'number') {
return {
'--va-button-px-size': `${props.size}px`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Fsss126, please, review this logic and how it can be applied to sizes config.

Copy link
Contributor

Choose a reason for hiding this comment

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

We have a size config refactoring in progress that would provide a more generalized way to solve cases like this one and make and desired customizations in-place #4246.

I would suggest releasing that one first and see if a need to pass px values would make sense to support then.

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 this pull request may close these issues.

VaButton: unable to set size in px
3 participants