-
Notifications
You must be signed in to change notification settings - Fork 3
/
layout-flat-config.ts
46 lines (39 loc) · 1.15 KB
/
layout-flat-config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import { Injectable } from '@angular/core';
import { OptionAllowedValues } from '@orchestrator/core';
import {
LayoutFlatAlignContentOptions,
LayoutFlatAlignItemsOptions,
LayoutFlatDirectionOptions,
LayoutFlatJustifyOptions,
LayoutFlatWrapOptions,
} from '../types';
const baseOptions = ['initial', 'inherit'];
const spacingOptions = ['center', 'flex-end', 'flex-start'];
/**
* Default configuration for {@link LayoutFlatHostComponent}
*/
@Injectable()
export class LayoutFlatConfig {
@OptionAllowedValues(...baseOptions, 'wrap', 'nowrap', 'wrap-reverse')
wrap?: LayoutFlatWrapOptions;
@OptionAllowedValues(...baseOptions, 'row', 'column')
direction?: LayoutFlatDirectionOptions;
@OptionAllowedValues(
...baseOptions,
...spacingOptions,
'space-between',
'space-around',
'space-evenly',
)
justify?: LayoutFlatJustifyOptions;
@OptionAllowedValues(...baseOptions, ...spacingOptions, 'baseline', 'stretch')
alignItems?: LayoutFlatAlignItemsOptions;
@OptionAllowedValues(
...baseOptions,
...spacingOptions,
'space-between',
'space-around',
'stretch',
)
alignContent?: LayoutFlatAlignContentOptions;
}