Skip to content

Commit

Permalink
feat(core): automatically include field-label (for input/textarea)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julius Osokinas committed Feb 10, 2021
1 parent f58d474 commit 790c8ab
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/core/src/components/index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use './includes';

@use './button/button';
@forward './button/button';
@use './checkbox/checkbox';
Expand All @@ -20,11 +22,14 @@
@mixin components() {
@include button.Button();
@include checkbox.Checkbox();
@include field-label.FieldLabel();
@include helper-text.HelperText();
@include icon.Icon();
@include input.Input();
@include radio.Radio();
@include search.Search();
@include textarea.Textarea();

@if not includes.the('field-label') {
@include field-label.FieldLabel();
}
}
7 changes: 7 additions & 0 deletions packages/core/src/components/input/input.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
@use '../../mixins';
@use '../includes';

@use '../field-label/field-label';

@mixin Input() {
@if not includes.the('field-label') {
@include field-label.FieldLabel();
}

.ods-input {
@include mixins.as-text-input();
}
Expand Down
7 changes: 7 additions & 0 deletions packages/core/src/components/textarea/textarea.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
@use '../../mixins';
@use '../includes';

@use '../field-label/field-label';

@mixin Textarea() {
@if not includes.the('field-label') {
@include field-label.FieldLabel();
}

.ods-textarea {
@include mixins.as-text-input();

Expand Down

0 comments on commit 790c8ab

Please sign in to comment.