]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-object-type/formly-object-type.component.ts
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / forms / crud-form / formly-object-type / formly-object-type.component.ts
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 */
4
5 import { Component } from '@angular/core';
6 import { FieldType } from '@ngx-formly/core';
7
8 @Component({
9 selector: 'cd-formly-object-type',
10 templateUrl: './formly-object-type.component.html',
11 styleUrls: ['./formly-object-type.component.scss']
12 })
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';
19 }
20 return defaultFlexClasses + ' flex-column';
21 }
22 }