libs/nx/src/generators/journey-src/lib/vertical-spacing/vertical-spacing.ts
Properties |
|
| dasherizedName | |
| Type |
string
|
| destinationDirectory | |
| Type |
string
|
| expert (Optional) | |
| Type |
boolean
|
| hasCompactBb (Optional) | |
| Type |
boolean
|
| hasSectionHeadline (Optional) | |
| Type |
boolean
|
| hasSectionWithDividerLine (Optional) | |
| Type |
boolean
|
| hasStage (Optional) | |
| Type |
boolean
|
| noMargin (Optional) | |
| Type |
boolean
|
| overarchingDetails (Optional) | |
| Type |
OverarchingDetailsBlockConfiguration
|
| runtimeMode (Optional) | |
| Type |
boolean
|
| title (Optional) | |
| Type |
string
|
| useEnhancedVerticalSpacing (Optional) | |
| Type |
boolean
|
| useShadowDomEncapsulation (Optional) | |
| Type |
boolean
|
import { OverarchingDetailsBlockConfiguration } from '@allianz/taly-core/schemas';
import { generateFiles, joinPathFragments, Tree } from '@nx/devkit';
interface VerticalSpacingOptions {
destinationDirectory: string;
dasherizedName: string;
hasSectionWithDividerLine?: boolean;
useEnhancedVerticalSpacing?: boolean;
hasStage?: boolean;
hasSectionHeadline?: boolean;
hasCompactBb?: boolean;
overarchingDetails?: OverarchingDetailsBlockConfiguration;
runtimeMode?: boolean;
expert?: boolean;
title?: string;
noMargin?: boolean;
useShadowDomEncapsulation?: boolean;
}
export function generateVerticalSpacingFiles(tree: Tree, options: VerticalSpacingOptions) {
generateFiles(tree, joinPathFragments(__dirname, 'files'), options.destinationDirectory, {
dasherizedName: options.dasherizedName,
hasSectionWithDividerLine: options.hasSectionWithDividerLine ?? false,
useEnhancedVerticalSpacing: options.useEnhancedVerticalSpacing ?? false,
hasStage: options.hasStage ?? false,
hasSectionHeadline: options.hasSectionHeadline ?? false,
hasCompactBb: options.hasCompactBb ?? false,
overarchingDetails: options.overarchingDetails ?? false,
runtimeMode: options.runtimeMode ?? false,
expert: options.expert ?? false,
title: options.title ?? '',
noMargin: options.noMargin ?? false,
useShadowDomEncapsulation: options.useShadowDomEncapsulation ?? false
});
}