Skip to content

Commit

Permalink
OTM-31207: On Description List Story, hide variant toggle from the ne…
Browse files Browse the repository at this point in the history
…sted lists
  • Loading branch information
xanxan committed Jun 20, 2024
1 parent bb14d35 commit 14731fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component } from '@angular/core';
import { DescriptionListComponent } from './description-list.component';
import docs from './description-list-docs.mdx';
import { FudisLanguageAbbr } from '../../types/miscellaneous';
import { descriptionListExclude } from '../../utilities/storybook';
import { descriptionListExclude, nestedDescriptionListExclude } from '../../utilities/storybook';
import { FudisTranslationService } from '../../services/translation/translation.service';

@Component({
Expand Down Expand Up @@ -224,6 +224,12 @@ NestedDescriptionLists.args = {
disableGrid: false,
};

NestedDescriptionLists.parameters = {
controls: {
exclude: nestedDescriptionListExclude,
},
};

const DescriptionListInsideGridTemplate: StoryFn<DescriptionListComponent> = (
args: DescriptionListComponent,
) => ({
Expand Down
5 changes: 5 additions & 0 deletions ngx-fudis/projects/ngx-fudis/src/lib/utilities/storybook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ export const descriptionListArgsTypesExclude: RegExp = excludeRegex([
'serviceDefaults',
]);

export const nestedDescriptionListExclude: RegExp = excludeRegex([
...descriptionListCommonExclude,
'variant',
]);

export const descriptionListExclude: RegExp = excludeRegex([...descriptionListCommonExclude]);

/**
Expand Down

0 comments on commit 14731fa

Please sign in to comment.