Skip to content

Commit

Permalink
feat(core): automatically include field-label (for input/textarea) (#293
Browse files Browse the repository at this point in the history
)
  • Loading branch information
josokinas authored Feb 10, 2021
1 parent 880be1b commit c9984f6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/src/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
@forward './textarea/textarea';

@mixin components() {
// conditionally includable in other components
@include field-label.FieldLabel();

// all the rest
@include button.Button();
@include checkbox.Checkbox();
@include field-label.FieldLabel();
@include helper-text.HelperText();
@include icon.Icon();
@include input.Input();
Expand Down
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 c9984f6

Please sign in to comment.