1 /** Copyright 2021 Formly. All Rights Reserved.
2 Use of this source code is governed by an MIT-style license that
3 can be found in the LICENSE file at https://github.com/ngx-formly/ngx-formly/blob/main/LICENSE */
5 import { Component } from '@angular/core';
6 import { FieldType } from '@ngx-formly/core';
9 selector: 'cd-formly-object-type',
10 templateUrl: './formly-object-type.component.html',
11 styleUrls: ['./formly-object-type.component.scss']
13 export class FormlyObjectTypeComponent extends FieldType {
14 get inputClass(): string {
15 const layoutType = this.props.templateOptions?.layoutType;
16 const defaultFlexClasses = 'd-flex justify-content-center align-content-stretch gap-3';
17 if (layoutType == 'row') {
18 return defaultFlexClasses + ' flex-row';
20 return defaultFlexClasses + ' flex-column';