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

[core] feat(NumericInput, FileInput): add "small" modifier prop #6071

Merged
merged 11 commits into from
Apr 18, 2023

Conversation

tmisirpash
Copy link
Contributor

@tmisirpash tmisirpash commented Apr 15, 2023

Fixes #5035

Checklist

  • Includes tests
  • Update documentation

Changes proposed in this pull request:

Reviewers should focus on:

Screenshot

@palantirtech
Copy link
Member

Thanks for your interest in palantir/blueprint, @tmisirpash! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

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

thanks @tmisirpash, can you please also add a demo for these new props to both fileInputExample.tsx and numericInputBasicExample.tsx?

@adidahiya adidahiya changed the title add small prop to numeric and file inputs [core] feat(NumericInput, FileInput): add "small" modifier prop Apr 17, 2023
Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

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

looks good in the docs preview build! and thanks for adding CSS API support.

just left a few code style comments, otherwise this is good to go :shipit:

@@ -26,6 +27,10 @@ $file-input-button-width: $pt-grid-size * 7 !default;
$file-input-button-width-large: $pt-grid-size * 8.5 !default;
$file-input-button-padding: ($pt-input-height - $pt-button-height-small) * 0.5 !default;
$file-input-button-padding-large: ($pt-input-height-large - $pt-button-height) * 0.5 !default;
$file-input-button-width-small: $pt-grid-size * 5.5 !default;

$pt-input-height-small-difference: $pt-input-height-small - $pt-button-height-smaller;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: no need for this variable, just inline its value on the next line

Suggested change
$pt-input-height-small-difference: $pt-input-height-small - $pt-button-height-smaller;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adidahiya Done, but I had to disable the max-line-length lint rule for it to work

$file-input-button-width-small: $pt-grid-size * 5.5 !default;

$pt-input-height-small-difference: $pt-input-height-small - $pt-button-height-smaller;
$file-input-button-padding-small: $pt-input-height-small-difference * 0.5 !default;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$file-input-button-padding-small: $pt-input-height-small-difference * 0.5 !default;
$file-input-button-padding-small: ($pt-input-height-small - $pt-button-height-smaller) * 0.5 !default;

@adidahiya adidahiya merged commit 7d003a8 into palantir:develop Apr 18, 2023
@tmisirpash tmisirpash deleted the tm/add_small_prop branch April 18, 2023 16:49
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.

Input - add small prop to numeric and file inputs
3 participants