Skip to content

Commit

Permalink
feat(field): add inline label (#834)
Browse files Browse the repository at this point in the history
ref: MANAGER-12722

Signed-off-by: Quentin Pavy <[email protected]>
  • Loading branch information
qpavy authored Dec 14, 2023
1 parent 7b48892 commit de558d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/field/src/js/field.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default {
errorMessages: '<?',
labelPopover: '@?',
forceErrorDisplay: '<?',
inline: '<?',
},
controller,
require: {
Expand Down
1 change: 1 addition & 0 deletions packages/components/field/src/js/field.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<div class="oui-field"
ng-class="[
{ 'oui-field_error': $ctrl.isErrorVisible() },
{ 'oui-field_inline': $ctrl.inline },
(!!$ctrl.size && 'oui-field_' + $ctrl.size),
]">
<div class="oui-field__header"
Expand Down
11 changes: 11 additions & 0 deletions packages/components/field/src/less/field.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
margin-bottom: @oui-field-header-spacing;
}

&_inline {
.oui-field__header {
display: inline-flex;
margin-right: 1rem;
}

.oui-field__control {
display: inline-block;
}
}

&__label {
display: inline-block;
margin: 0;
Expand Down

0 comments on commit de558d3

Please sign in to comment.