This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
-
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.
refactor(btn, btn-group, input-group): use grouped modifiers in a mor…
…e flexible way BREAKING CHANGES: dc-btn--grouped modifier becomes a partial _dc-btn--grouped which is extended in every molecule that uses it, for instance dc-btn--in-input-group or dc-btn--in-btn-group. dc-input-group__input becomes dc-input--in-input-group Change your code from this: ```html <div class="dc-input-group"> <span class="dc-input-addon">User</span> <input class="dc-input dc-input-group__input"/> <a class="dc-btn dc-btn--grouped dc-btn--primary">Add</a> </div> ``` To this: ```html <div class="dc-input-group"> <span class="dc-input-addon">User</span> <input class="dc-input dc-input--in-input-group"/> <a class="dc-btn dc-btn--in-input-group dc-btn--primary">Add</a> </div> ```
- Loading branch information
Showing
5 changed files
with
35 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
--- | ||
notes: | | ||
Create input groups by using `.dc-input-group` to wrap inputs with the class `.dc-input-group__input`, addons with the class `.dc-input-addon` and buttons with the class `dc-btn--grouped`. | ||
Create input groups by using `.dc-input-group` to wrap inputs with the class `.dc-input--in-input-group`, addons with the class `.dc-input-addon` and buttons with the class `dc-btn--grouped`. | ||
--- | ||
<label class="dc-label" for="priceInput">Addon - Appended</label> | ||
<div class="dc-input-group"> | ||
<input class="dc-input dc-input-group__input dc-input--text-right" type="text" id="priceInput" placeholder="e. g. 100"/> | ||
<input class="dc-input dc-input--in-input-group dc-input--text-right" type="text" id="priceInput" placeholder="e. g. 100"/> | ||
<div class="dc-input-addon">€</div> | ||
</div> | ||
|
||
<label class="dc-label" for="urlInput">Addon - Prepended</label> | ||
<div class="dc-input-group"> | ||
<span class="dc-input-addon">http://</span> | ||
<input class="dc-input dc-input-group__input" type="text" id="urlInput" placeholder="e. g. brands.zalando.com"/> | ||
<input class="dc-input dc-input--in-input-group" type="text" id="urlInput" placeholder="e. g. brands.zalando.com"/> | ||
</div> | ||
|
||
<label class="dc-label" for="urlInput2">Button - Appended</label> | ||
<div class="dc-input-group"> | ||
<input class="dc-input dc-input-group__input" type="text" id="urlInput2" placeholder="e. g. brands.zalando.com"/> | ||
<button class="dc-btn dc-btn--grouped dc-btn--primary"> | ||
<input class="dc-input dc-input--in-input-group" type="text" id="urlInput2" placeholder="e. g. brands.zalando.com"/> | ||
<button class="dc-btn dc-btn--in-input-group dc-btn--primary"> | ||
<i class="dc-icon dc-icon--search dc-icon--btn"></i> | ||
</button> | ||
</div> | ||
|
||
<label class="dc-label" for="urlInput">Addon - Prepended & Button - Appended</label> | ||
<div class="dc-input-group"> | ||
<span class="dc-input-addon">User 1</span> | ||
<input class="dc-input dc-input-group__input" type="text" id="urlInput" placeholder="Full name"/> | ||
<a class="dc-btn dc-btn--grouped dc-btn--primary">Add</a> | ||
<input class="dc-input dc-input--in-input-group" type="text" id="urlInput" placeholder="Full name"/> | ||
<a class="dc-btn dc-btn--in-input-group dc-btn--primary">Add</a> | ||
</div> |
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