-
Notifications
You must be signed in to change notification settings - Fork 994
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #30638 - replace react-numeric-input with rc-number-input
- Loading branch information
yifatmakias
committed
Aug 17, 2020
1 parent
c752ff9
commit eed049e
Showing
6 changed files
with
114 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
webpack/assets/javascripts/react_app/components/common/forms/NumericInput.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
|
||
.foreman-numeric-input { | ||
position: relative; | ||
display: flex !important; | ||
|
||
.foreman-numeric-input-input-wrap { | ||
width: 100%; | ||
|
||
input { | ||
flex: 1; | ||
height: 28px; | ||
width: 100%; | ||
padding-right: 3ex; | ||
box-sizing: border-box; | ||
font-size: inherit; | ||
border: 1px solid rgb(204, 204, 204); | ||
border-radius: 2px; | ||
padding-left: 4px; | ||
display: block; | ||
appearance: none; | ||
line-height: normal; | ||
} | ||
} | ||
|
||
.foreman-numeric-input-handler-up-inner, | ||
.foreman-numeric-input-handler-down-inner { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
width: 0; | ||
height: 0; | ||
border-style: solid; | ||
margin: -0.3ex 0 0 -0.56ex; | ||
} | ||
|
||
.foreman-numeric-input-handler-up-inner { | ||
border-width: 0 0.6ex 0.6ex 0.6ex; | ||
border-color: transparent transparent rgba(0, 0, 0, 0.7); | ||
} | ||
|
||
.foreman-numeric-input-handler-down-inner { | ||
border-width: 0.6ex 0.6ex 0 0.6ex; | ||
border-color: rgba(0, 0, 0, 0.7) transparent transparent; | ||
} | ||
|
||
.foreman-numeric-input-handler-up { | ||
top: 2px; | ||
bottom: 50%; | ||
border-radius: 2px 2px 0 0; | ||
border-width: 1px 1px 0; | ||
} | ||
|
||
.foreman-numeric-input-handler-down { | ||
top: 50%; | ||
bottom: 2px; | ||
border-radius: 0 0 2px 2px; | ||
border-width: 0 1px 1px 1px; | ||
} | ||
|
||
.foreman-numeric-input-handler-up, | ||
.foreman-numeric-input-handler-down { | ||
position: absolute; | ||
right: 2px; | ||
width: 2.26ex; | ||
border-color: rgba(0, 0, 0, 0.1); | ||
border-style: solid; | ||
text-align: center; | ||
cursor: default; | ||
transition: all 0.1s ease 0s; | ||
background: rgba(0, 0, 0, 0.1); | ||
box-shadow: rgba(0, 0, 0, 0.1) -1px -1px 3px inset, rgba(255, 255, 255, 0.7) 1px 1px 3px inset; | ||
|
||
&:hover { | ||
background: rgba(0, 0, 0, 0.2); | ||
} | ||
|
||
&:active { | ||
background: rgba(0, 0, 0, 0.3); | ||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) inset, -1px -1px 4px rgba(255, 255, 255, 0.5) inset; | ||
} | ||
|
||
&:disabled { | ||
opacity: 0.5; | ||
box-shadow: none; | ||
cursor: not-allowed; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters