-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Input): add Clearable parameter (#4991)
* feat: 增加 InputClearIcon 定义 * feat: 增加 Clearable 属性 * refactor: 禁用模式下不显示 Clear 按钮 * test: 增加单元测试 * chore: bump version 9.2.0-beta01 Co-Authored-By: zph19970424 <[email protected]> --------- Co-authored-by: zph19970424 <[email protected]>
- Loading branch information
1 parent
70ebace
commit f83730d
Showing
9 changed files
with
146 additions
and
4 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
29 changes: 29 additions & 0 deletions
29
src/BootstrapBlazor/Components/Input/BootstrapInput.razor.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,29 @@ | ||
.bb-clearable-input { | ||
display: inline-flex; | ||
align-items: center; | ||
flex-grow: 1; | ||
width: 100%; | ||
position: relative; | ||
|
||
> input { | ||
width: 100%; | ||
flex-grow: 1; | ||
padding-right: 2rem; | ||
|
||
+ .form-control-clear-icon { | ||
color: var(--bb-border-hover-color); | ||
cursor: pointer; | ||
position: absolute; | ||
right: 11px; | ||
display: none; | ||
} | ||
|
||
&:focus + .form-control-clear-icon { | ||
display: block; | ||
} | ||
} | ||
|
||
&:hover .form-control-clear-icon { | ||
display: block; | ||
} | ||
} |
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