Skip to content

Commit

Permalink
fix: user-card storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
rfrt committed Aug 9, 2024
1 parent 84de98b commit f74370d
Show file tree
Hide file tree
Showing 9 changed files with 177 additions and 179 deletions.
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"compodoc": true,
"compodocArgs": ["-e", "json", "-d", "projects/storybook"],
"port": 6006,
"styles": ["@angular/material/prebuilt-themes/indigo-pink.css", "@fontsource/roboto/300.css", "@fontsource/roboto/400.css", "@fontsource/roboto/500.css", "@fontsource/roboto/700.css", "@fontsource/material-icons", "./projects/user-card/src/_user-card-theme.scss"]
"styles": ["@angular/material/prebuilt-themes/indigo-pink.css", "@fontsource/roboto/300.css", "@fontsource/roboto/400.css", "@fontsource/roboto/500.css", "@fontsource/roboto/700.css", "@fontsource/material-icons", "./projects/storybook/src/stories/user-card/user-card.scss"]
}
},
"build-storybook": {
Expand All @@ -141,7 +141,7 @@
"compodoc": true,
"compodocArgs": ["-e", "json", "-d", "projects/storybook"],
"outputDir": "dist/storybook/storybook",
"styles": ["@angular/material/prebuilt-themes/indigo-pink.css", "@fontsource/roboto/300.css", "@fontsource/roboto/400.css", "@fontsource/roboto/500.css", "@fontsource/roboto/700.css", "@fontsource/material-icons", "./projects/user-card/src/_user-card-theme.scss"]
"styles": ["@angular/material/prebuilt-themes/indigo-pink.css", "@fontsource/roboto/300.css", "@fontsource/roboto/400.css", "@fontsource/roboto/500.css", "@fontsource/roboto/700.css", "@fontsource/material-icons", "./projects/storybook/src/stories/user-card/user-card.scss"]
}
}
}
Expand Down
1 change: 1 addition & 0 deletions projects/storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const preview: Preview = {
date: /Date$/i,
},
},
layout: 'centered'
},
};

Expand Down
79 changes: 1 addition & 78 deletions projects/storybook/documentation.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"assetsDirs": [],
"styleUrlsData": [
{
"data": "@use '@angular/material' as mat;\n@use '../../../../core/src/styles/mixins/icon-theme' as iconTheme;\n@use '../../../../core/src/styles/mixins/menu-theme' as menuTheme;\n@use '../../../../core/src/styles/themeVariables' as themeVariables;\n@use '../../../../core/src/styles/theme';\n@use '../../../../list-loader/src/list-loader-theme' as listLoaderTheme;\n\n@include listLoaderTheme.theme(themeVariables.$theme);\n@include iconTheme.theme(themeVariables.$theme);\n@include menuTheme.theme(themeVariables.$theme);\n\nsection {\n padding: 5rem;\n font-family: 'Roboto';\n display: flex;\n gap: 5px;\n}\n",
"data": "// @use '@angular/material' as mat;\n// @use '../../../../core/src/styles/mixins/icon-theme' as iconTheme;\n// @use '../../../../core/src/styles/mixins/menu-theme' as menuTheme;\n// @use '../../../../core/src/styles/themeVariables' as themeVariables;\n// @use '../../../../core/src/styles/theme';\n// @use '../../../../list-loader/src/list-loader-theme' as listLoaderTheme;\n\n// @include listLoaderTheme.theme(themeVariables.$theme);\n// @include iconTheme.theme(themeVariables.$theme);\n// @include menuTheme.theme(themeVariables.$theme);\n\n// section {\n// padding: 5rem;\n// font-family: 'Roboto';\n// display: flex;\n// gap: 5px;\n// }\n",
"styleUrl": "./list-loader.scss"
}
],
Expand Down Expand Up @@ -364,74 +364,6 @@
"stylesData": "",
"extends": [],
"templateData": "<section>\n <ngx-search-container [clearTooltip]=\"clearTooltipLabel\">\n <input ngx-search-input type=\"text\" [placeholder]=\"placeholder\" [(ngModel)]=\"searchModel\" (ngModelChange)=\"searchQueryChanged($event)\" />\n </ngx-search-container>\n <br />\n <div class=\"listsContainer\">\n <div class=\"fullList\">\n <span>Liste complète</span>\n <mat-list role=\"list\">\n @for (animal of fullList; track $index) {\n <mat-list-item role=\"listitem\">{{ animal }}</mat-list-item>\n }\n </mat-list>\n </div>\n <div class=\"searchList\">\n <span>Liste issu de la recherche</span>\n <mat-list role=\"list\">\n @for (animal of searchList; track $index) {\n <mat-list-item role=\"listitem\">{{ animal }}</mat-list-item>\n }\n </mat-list>\n </div>\n </div>\n</section>\n"
},
{
"name": "StorybookUserCardComponent",
"id": "component-StorybookUserCardComponent-ad0365acdaea752834f1d8c9b7b8fa861ee09656b9f6f688900035e8866391d1f963dbfa8e8e4ae81f0141683d4109a1544d4f812062991d9322139f3ef93b61",
"file": "projects/storybook/src/stories/user-card/user-card.component.ts",
"changeDetection": "ChangeDetectionStrategy.OnPush",
"encapsulation": ["ViewEncapsulation.None"],
"entryComponents": [],
"inputs": [],
"outputs": [],
"providers": [],
"selector": "storybook-user-card",
"styleUrls": ["./user-card.scss"],
"styles": [],
"templateUrl": ["./user-card.component.html"],
"viewProviders": [],
"hostDirectives": [],
"inputsClass": [
{
"name": "expanded",
"defaultValue": "true",
"deprecated": false,
"deprecationMessage": "",
"line": 23,
"type": "boolean",
"decorators": []
},
{
"name": "user",
"deprecated": false,
"deprecationMessage": "",
"line": 20,
"type": "NgxUserCard",
"decorators": []
}
],
"outputsClass": [],
"propertiesClass": [],
"methodsClass": [],
"deprecated": false,
"deprecationMessage": "",
"hostBindings": [],
"hostListeners": [],
"standalone": true,
"imports": [
{
"name": "CommonModule",
"type": "module"
},
{
"name": "NgxUserCardComponent",
"type": "component"
}
],
"description": "",
"rawdescription": "\n",
"type": "component",
"sourceCode": "import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';\n\nimport { NgxUserCardComponent } from '../../../../user-card/src/user-card.component';\nimport type { NgxUserCard } from '../../../../user-card/src/user-card.model';\n\n\n@Component({\n selector: 'storybook-user-card',\n templateUrl: './user-card.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n imports: [CommonModule, NgxUserCardComponent],\n styleUrls: ['./user-card.scss']\n})\nexport class StorybookUserCardComponent {\n\n @Input()\n public user!: NgxUserCard;\n\n @Input()\n public expanded = true;\n}\n",
"assetsDirs": [],
"styleUrlsData": [
{
"data": "@use '@angular/material' as mat;\n@use '../../../../core/src/styles/mixins/icon-theme' as iconTheme;\n@use '../../../../core/src/styles/mixins/menu-theme' as menuTheme;\n@use '../../../../core/src/styles/themeVariables' as themeVariables;\n@use '../../../../core/src/styles/theme';\n@use '../../../../user-card/src/user-card-theme' as userCardTheme;\n\n@include userCardTheme.theme(themeVariables.$theme);\n@include iconTheme.theme(themeVariables.$theme);\n@include menuTheme.theme(themeVariables.$theme);\n\nsection {\n padding: 5rem;\n font-family: 'Roboto';\n display: flex;\n gap: 5px;\n}\n",
"styleUrl": "./user-card.scss"
}
],
"stylesData": "",
"extends": [],
"templateData": "<section>\n <ngx-user-card [user]=\"user\" [expanded]=\"expanded\"></ngx-user-card>\n</section>\n"
}
],
"modules": [],
Expand Down Expand Up @@ -467,15 +399,6 @@
"coveragePercent": 0,
"coverageCount": "0/7",
"status": "low"
},
{
"filePath": "projects/storybook/src/stories/user-card/user-card.component.ts",
"type": "component",
"linktype": "component",
"name": "StorybookUserCardComponent",
"coveragePercent": 0,
"coverageCount": "0/3",
"status": "low"
}
]
}
Expand Down
30 changes: 15 additions & 15 deletions projects/storybook/src/stories/list-loader/list-loader.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@use '@angular/material' as mat;
@use '../../../../core/src/styles/mixins/icon-theme' as iconTheme;
@use '../../../../core/src/styles/mixins/menu-theme' as menuTheme;
@use '../../../../core/src/styles/themeVariables' as themeVariables;
@use '../../../../core/src/styles/theme';
@use '../../../../list-loader/src/list-loader-theme' as listLoaderTheme;
// @use '@angular/material' as mat;
// @use '../../../../core/src/styles/mixins/icon-theme' as iconTheme;
// @use '../../../../core/src/styles/mixins/menu-theme' as menuTheme;
// @use '../../../../core/src/styles/themeVariables' as themeVariables;
// @use '../../../../core/src/styles/theme';
// @use '../../../../list-loader/src/list-loader-theme' as listLoaderTheme;

@include listLoaderTheme.theme(themeVariables.$theme);
@include iconTheme.theme(themeVariables.$theme);
@include menuTheme.theme(themeVariables.$theme);
// @include listLoaderTheme.theme(themeVariables.$theme);
// @include iconTheme.theme(themeVariables.$theme);
// @include menuTheme.theme(themeVariables.$theme);

section {
padding: 5rem;
font-family: 'Roboto';
display: flex;
gap: 5px;
}
// section {
// padding: 5rem;
// font-family: 'Roboto';
// display: flex;
// gap: 5px;
// }

This file was deleted.

24 changes: 0 additions & 24 deletions projects/storybook/src/stories/user-card/user-card.component.ts

This file was deleted.

7 changes: 0 additions & 7 deletions projects/storybook/src/stories/user-card/user-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,3 @@
@include userCardTheme.theme(themeVariables.$theme);
@include iconTheme.theme(themeVariables.$theme);
@include menuTheme.theme(themeVariables.$theme);

section {
padding: 5rem;
font-family: 'Roboto';
display: flex;
gap: 5px;
}
Loading

0 comments on commit f74370d

Please sign in to comment.