-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pattern/inputs): add left icon support (#294)
- Loading branch information
1 parent
bf25de6
commit 2750e6f
Showing
9 changed files
with
108 additions
and
42 deletions.
There are no files selected for viewing
Binary file not shown.
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,19 @@ | ||
.mc-left-icon-input { | ||
position: relative; | ||
|
||
&__icon { | ||
position: absolute; | ||
z-index: 1; | ||
left: $mu075; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
width: $mu150; | ||
height: $mu150; | ||
fill: $color-input-border; | ||
pointer-events: none; | ||
} | ||
|
||
&__input { | ||
padding-left: $mu300; | ||
} | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
36 changes: 36 additions & 0 deletions
36
src/pages/Components/TextInput/previews/left-icon-input.preview.html
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,36 @@ | ||
<div class="example"> | ||
<div class="mc-left-icon-input"> | ||
<svg class="mc-left-icon-input__icon"> | ||
<use xlink:href="#iconS" /> | ||
</svg> | ||
<input type="date" class="mc-left-icon-input__input mc-text-input" /> | ||
</div> | ||
<br /> | ||
<div class="mc-left-icon-input"> | ||
<svg class="mc-left-icon-input__icon"> | ||
<use xlink:href="#iconS" /> | ||
</svg> | ||
<input | ||
type="date" | ||
class="mc-left-icon-input__input mc-text-input is-valid" | ||
/> | ||
</div> | ||
<br /> | ||
<div class="mc-left-icon-input"> | ||
<svg class="mc-left-icon-input__icon"> | ||
<use xlink:href="#iconS" /> | ||
</svg> | ||
<input | ||
type="date" | ||
class="mc-left-icon-input__input mc-text-input is-invalid" | ||
/> | ||
</div> | ||
</div> | ||
|
||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none"> | ||
<symbol id="iconS" viewBox="0 0 24 24"> | ||
<path | ||
d="M17.5 4V3a1 1 0 0 0-2 0v1H13V3a1 1 0 0 0-2 0v1H8.5V3a1 1 0 0 0-2 0v1H3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h18a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1zm-11 2v1a1 1 0 0 0 2 0V6H11v1a1 1 0 0 0 2 0V6h2.5v1a1 1 0 0 0 2 0V6H20v3.5H4V6zM4 20v-8.5h16V20z" | ||
/> | ||
</symbol> | ||
</svg> |
8 changes: 8 additions & 0 deletions
8
src/pages/Components/TextInput/previews/left-icon-input.preview.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,8 @@ | ||
@import 'settings-tools/_all-settings'; | ||
@import 'components/_c.text-input'; | ||
@import 'components/_c.left-icon-input'; | ||
|
||
.example { | ||
margin: $mu200 0; | ||
padding: 0 $mu200; | ||
} |