Skip to content

Commit

Permalink
feat(experimental): add TuiCard (#5777)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Nov 13, 2023
1 parent 94f4020 commit d2c5e86
Show file tree
Hide file tree
Showing 39 changed files with 1,223 additions and 2 deletions.
132 changes: 132 additions & 0 deletions projects/demo/src/assets/images/fly.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions projects/demo/src/assets/images/google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions projects/demo/src/assets/images/microsoft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 110 additions & 0 deletions projects/demo/src/assets/images/poster.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions projects/demo/src/modules/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@ export const ROUTES: Routes = [
title: `Toggle `,
},
},
{
path: `experimental/card`,
loadChildren: async () =>
(await import(`../experimental/card/card.module`)).ExampleTuiCardModule,
data: {
title: `Card`,
},
},
{
path: `experimental/badge`,
loadChildren: async () =>
Expand Down
6 changes: 6 additions & 0 deletions projects/demo/src/modules/app/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,12 @@ export const pages: TuiDocPages = [
keywords: `amount, money, деньги, сумма, количество, cash, копейки, рубли, доллары, евро`,
route: `/experimental/amount`,
},
{
section: `Experimental`,
title: `Card`,
keywords: `card, block, карточка, блок`,
route: `/experimental/card`,
},
// Charts
{
section: `Charts`,
Expand Down
60 changes: 60 additions & 0 deletions projects/demo/src/modules/experimental/card/card.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {TuiDocExample, TuiRawLoaderContent} from '@taiga-ui/addon-doc';

@Component({
selector: 'example-card',
templateUrl: './card.template.html',
changeDetection,
})
export class ExampleTuiCardComponent {
readonly exampleModule: TuiRawLoaderContent = import(
'./examples/import/import-module.md?raw'
);

readonly exampleHtml: TuiRawLoaderContent = import(
'./examples/import/insert-template.md?raw'
);

readonly example1: TuiDocExample = {
TypeScript: import('./examples/1/index.ts?raw'),
HTML: import('./examples/1/index.html?raw'),
LESS: import('./examples/1/index.less?raw'),
};

readonly example2: TuiDocExample = {
TypeScript: import('./examples/2/index.ts?raw'),
HTML: import('./examples/2/index.html?raw'),
LESS: import('./examples/2/index.less?raw'),
};

readonly example3: TuiDocExample = {
TypeScript: import('./examples/3/index.ts?raw'),
HTML: import('./examples/3/index.html?raw'),
LESS: import('./examples/3/index.less?raw'),
};

readonly example4: TuiDocExample = {
TypeScript: import('./examples/4/index.ts?raw'),
HTML: import('./examples/4/index.html?raw'),
LESS: import('./examples/4/index.less?raw'),
};

readonly example5: TuiDocExample = {
TypeScript: import('./examples/5/index.ts?raw'),
HTML: import('./examples/5/index.html?raw'),
LESS: import('./examples/5/index.less?raw'),
};

readonly example6: TuiDocExample = {
TypeScript: import('./examples/6/index.ts?raw'),
HTML: import('./examples/6/index.html?raw'),
LESS: import('./examples/6/index.less?raw'),
};

readonly example7: TuiDocExample = {
TypeScript: import('./examples/7/index.ts?raw'),
HTML: import('./examples/7/index.html?raw'),
LESS: import('./examples/7/index.less?raw'),
};
}
Loading

0 comments on commit d2c5e86

Please sign in to comment.