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

Add labelless Select #168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions src/packages/core/src/select/select.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
}
}

._e_select._e_input_labelless {
& ._e_input__control:invalid {
font: var(--Body1);
color: var(--N600);
}
}

._e_select__arrow {
width: var(--S24);
height: var(--S24);
Expand Down
22 changes: 22 additions & 0 deletions src/packages/core/src/select/select.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,25 @@
<span class="_e_input__hint">Hint</span>
</div>
</p>

<p>
<div class="_e_input _e_input_size_6 _e_input_labelless _e_select">
<label class="_e_input__field">
<select class="_e_input__control" required>
<option value="" disabled selected>Placeholder</option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
<span class="_e_input__background"></span>
<span class="_e_input__line"></span>
<div class="_e_input__icon _e_input__icon_passive">
<div class="_e_select__arrow">
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path id="icon/navigation/arrow_drop_down_24px" d="M8.33031 11.8617L11.2159 14.6815C11.6504 15.1062 12.3523 15.1062 12.7868 14.6815L15.6724 11.8617C16.3743 11.1758 15.873 10 14.8814 10H9.11021C8.11863 10 7.62841 11.1758 8.33031 11.8617Z" />
</svg>
</div>
</div>
</label>
</div>
</p>