-
Notifications
You must be signed in to change notification settings - Fork 995
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 19, 2020
1 parent
85befdd
commit ff79968
Showing
6 changed files
with
126 additions
and
32 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
95 changes: 95 additions & 0 deletions
95
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,95 @@ | ||
@import "~@theforeman/vendor/scss/variables"; | ||
|
||
.foreman-numeric-input { | ||
position: relative; | ||
display: flex; | ||
|
||
.foreman-numeric-input-input-wrap { | ||
width: 100%; | ||
|
||
input { | ||
flex: 1; | ||
height: 26px; | ||
width: 100%; | ||
padding-right: $padding-small-vertical; | ||
box-sizing: border-box; | ||
font-size: inherit; | ||
border: 1px solid $input-border; | ||
border-radius: $input-border-radius; | ||
padding-left: $padding-small-vertical; | ||
display: block; | ||
appearance: none; | ||
line-height: normal; | ||
|
||
&:focus { | ||
outline: $input-border-focus auto 0.5px; | ||
} | ||
|
||
&:hover { | ||
border-color: $input-border-hover; | ||
} | ||
} | ||
} | ||
|
||
.foreman-numeric-input-handler-up-inner, | ||
.foreman-numeric-input-handler-down-inner { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
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 $color-pf-black-600; | ||
} | ||
|
||
.foreman-numeric-input-handler-down-inner { | ||
border-width: 0.6ex 0.6ex 0 0.6ex; | ||
border-color: $color-pf-black-600 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: $color-pf-black-300; | ||
border-style: solid; | ||
text-align: center; | ||
cursor: default; | ||
transition: all 0.1s ease 0s; | ||
background: $color-pf-black-300; | ||
box-shadow: $color-pf-black-300 -1px -1px 3px inset, $color-pf-black-200 1px 1px 3px inset; | ||
|
||
&:hover { | ||
background: $color-pf-black-400; | ||
} | ||
|
||
&:active { | ||
background: $color-pf-black-500; | ||
box-shadow: 0 1px 3px $color-pf-black-300 inset, -1px -1px 4px $color-pf-black-200 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