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

fix(inputbutton): update inputbutton styles #1486

Merged
merged 5 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(style): fix feedbacks
  • Loading branch information
Zhang Rui committed Nov 19, 2021
commit 73e50dae62b24a7e88fa7a523574e4fd41c5c9f0
3 changes: 2 additions & 1 deletion src/input/InputButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ const InputButton = React.forwardRef<HTMLInputElement, InputButtonProps>((props,
style={{ ...style, ...styles }}
className={inputCls}
type="button"
value={value || placeholder}
value={value}
placeholder={placeholder}
onChange={onChange}
prefix={customizePrefix}
suffix={suffix}
Expand Down
22 changes: 11 additions & 11 deletions src/input/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
box-sizing: border-box;
height: 36px;
padding: 0 8px;
border: 1px solid @gray-2;
border-radius: @radius-border-small;
Quesle marked this conversation as resolved.
Show resolved Hide resolved
.border();
.text-body1();

& > input {
width: 100%;
padding: 0;
background-color: #00000000;
border: none;
text-align: left;
overflow: hidden;
color: @gray-5;
text-align: left;
background-color: #0000;
border: none;
font-family+: @font-family-primary;
font-family+: @font-family-number;
&:not([disabled]):hover,
Expand Down Expand Up @@ -52,11 +52,11 @@

&__disabled {
background-color: @gray-1;
border: 1px solid @gray-2;
.border();
cursor: not-allowed;
&:hover {
background-color: @gray-1;
border: 1px solid @gray-2;
.border();
}
& > input {
color: @gray-3;
Expand All @@ -75,10 +75,10 @@
}

&__suffix {
margin: 0 4px;
display: inline-flex;
justify-content: center;
align-items: center;
justify-content: center;
margin: 0 4px;

.@{icon-prefix-cls} {
cursor: pointer;
Expand All @@ -91,10 +91,10 @@
}

&__prefix {
margin: 0 4px;
display: inline-flex;
justify-content: center;
align-items: center;
justify-content: center;
margin: 0 4px;

.@{icon-prefix-cls} {
cursor: pointer;
Expand All @@ -110,8 +110,8 @@
.@{textarea-prefix-cls} {
height: auto;
min-height: 36px;
resize: vertical;
color: @gray-5;
resize: vertical;
font-family+: @font-family-primary;
font-family+: @font-family-number;
.text-body1();
Expand Down