Skip to content

Commit

Permalink
feat: storybooks split
Browse files Browse the repository at this point in the history
  • Loading branch information
markuczy committed Nov 7, 2024
1 parent 35e3315 commit 5924133
Show file tree
Hide file tree
Showing 11 changed files with 512 additions and 448 deletions.
8 changes: 7 additions & 1 deletion libs/angular-accelerator/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ const preview: Preview = {
date: /Date$/,
},
},
options: {
storySort: {
method: 'alphabetical',
order: ['Components', '*'],
},
},
},
tags: ['autodocs', 'autodocs', 'autodocs']
tags: ['autodocs', 'autodocs', 'autodocs'],
}

export default preview
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type CustomGroupColumnSelectorInputs = Pick<
| 'inactiveColumnsLabel'
>
const CustomGroupColumnSelectorComponentSBConfig: Meta<CustomGroupColumnSelectorComponent> = {
title: 'CustomGroupColumnSelectorComponent',
title: 'Components/CustomGroupColumnSelectorComponent',
component: CustomGroupColumnSelectorComponent,
decorators: [
applicationConfig({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { TooltipOnOverflowDirective } from '../../directives/tooltipOnOverflow.d
import { MockAuthModule } from '../../mock-auth/mock-auth.module'

const DataListGridComponentSBConfig: Meta<DataListGridComponent> = {
title: 'DataListGridComponent',
title: 'Components/DataListGridComponent',
component: DataListGridComponent,
decorators: [
applicationConfig({
Expand Down Expand Up @@ -185,9 +185,9 @@ export const ListWithAdditionalActions = {
id: '1',
labelKey: 'Additional 1',
icon: 'pi pi-plus',
permission: 'TEST_MGMT#TEST_VIEW'
}
]
permission: 'TEST_MGMT#TEST_VIEW',
},
],
},
}

Expand All @@ -202,9 +202,9 @@ export const ListWithConditionallyEnabledAdditionalActions = {
labelKey: 'Additional 1',
icon: 'pi pi-plus',
permission: 'TEST_MGMT#TEST_VIEW',
actionEnabledField: 'available'
}
]
actionEnabledField: 'available',
},
],
},
}

Expand All @@ -219,9 +219,9 @@ export const ListWithConditionallyVisibleAdditionalActions = {
labelKey: 'Additional 1',
icon: 'pi pi-plus',
permission: 'TEST_MGMT#TEST_VIEW',
actionVisibleField: 'available'
}
]
actionVisibleField: 'available',
},
],
},
}

Expand Down Expand Up @@ -254,7 +254,7 @@ export const ListWithAdditionalOverflowActions = {
showAsOverflow: true,
actionEnabledField: 'available',
},
]
],
},
}

Expand Down Expand Up @@ -293,7 +293,7 @@ export const ListWithOnlyAdditionalOverflowActions = {
showAsOverflow: true,
actionEnabledField: 'available',
},
]
],
},
}

Expand All @@ -303,7 +303,7 @@ export const ListWithPageSizes = {
args: {
...defaultComponentArgs,
pageSizes: [2, 15, 25],
data: extendedMockData
data: extendedMockData,
},
}

Expand Down Expand Up @@ -359,9 +359,9 @@ export const GridWithAdditionalActions = {
id: '1',
labelKey: 'Additional 1',
icon: 'pi pi-plus',
permission: 'TEST_MGMT#TEST_VIEW'
}
]
permission: 'TEST_MGMT#TEST_VIEW',
},
],
},
}

Expand All @@ -377,9 +377,9 @@ export const GridWithConditionallyEnabledAdditionalActions = {
labelKey: 'Additional 1',
icon: 'pi pi-plus',
permission: 'TEST_MGMT#TEST_VIEW',
actionEnabledField: 'available'
}
]
actionEnabledField: 'available',
},
],
},
}

Expand All @@ -395,9 +395,9 @@ export const GridWithConditionallyVisibleAdditionalActions = {
labelKey: 'Additional 1',
icon: 'pi pi-plus',
permission: 'TEST_MGMT#TEST_VIEW',
actionVisibleField: 'available'
}
]
actionVisibleField: 'available',
},
],
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { FormsModule } from '@angular/forms'
type DataTableInputTypes = Pick<DataTableComponent, 'rows' | 'columns' | 'emptyResultsMessage' | 'selectedRows'>

const DataTableComponentSBConfig: Meta<DataTableComponent> = {
title: 'DataTableComponent',
title: 'Components/DataTableComponent',
component: DataTableComponent,
decorators: [
applicationConfig({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DiagramType } from '../../model/diagram-type'
import { DiagramData } from '../../model/diagram-data'

export default {
title: 'DiagramComponent',
title: 'Components/DiagramComponent',
component: DiagramComponent,
argTypes: {
diagramType: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { DiagramComponent } from '../diagram/diagram.component'
import { ColumnType } from '../../model/column-type.model'

export default {
title: 'GroupByCountDiagramComponent',
title: 'Components/GroupByCountDiagramComponent',
component: GroupByCountDiagramComponent,
argTypes: {
diagramType: {
Expand Down
Loading

0 comments on commit 5924133

Please sign in to comment.