Skip to content

Commit

Permalink
fix: currency padding
Browse files Browse the repository at this point in the history
  • Loading branch information
korywka committed Sep 10, 2021
1 parent 63d2e9f commit af45ad3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@macpaw/macpaw-ui",
"version": "3.7.6",
"version": "3.7.7",
"main": "lib/ui.js",
"scripts": {
"dev": "next -p 1234",
Expand Down
10 changes: 8 additions & 2 deletions src/Input/Input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,14 @@
}
}

input.-with-gap {
padding-right: 90px;
input {
&.-with-action {
padding-right: 90px;
}

&.-with-currency {
padding-right: 60px;
}
}

textarea {
Expand Down
2 changes: 1 addition & 1 deletion src/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Input = forwardRef<HTMLInputElement, InputProps>((props, ref) => {
});

const componentProps: any = {
className: cx({ '-with-gap': action || currency }, className),
className: cx(action && '-with-action', currency && '-with-currency', className),
};

const showHintError = error && typeof error !== 'boolean';
Expand Down

0 comments on commit af45ad3

Please sign in to comment.