Skip to content

Commit

Permalink
chore(demo): use TUI_PAYMENT_SYSTEM_ICONS token for documentation p…
Browse files Browse the repository at this point in the history
…age `ThumbnailCard`
  • Loading branch information
nsbarsukov committed Dec 11, 2024
1 parent cabef9a commit 207c974
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</tui-thumbnail-card>

<tui-thumbnail-card
paymentSystem="amex"
paymentSystem="unionpay"
size="l"
class="radial"
>
Expand Down
23 changes: 5 additions & 18 deletions projects/demo/src/modules/components/thumbnail-card/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Component} from '@angular/core';
import {Component, inject} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {TuiDemo} from '@demo/utils';
import type {TuiPaymentSystem} from '@taiga-ui/addon-commerce';
import {TuiThumbnailCard} from '@taiga-ui/addon-commerce';
import {TUI_PAYMENT_SYSTEM_ICONS, TuiThumbnailCard} from '@taiga-ui/addon-commerce';
import type {TuiBooleanHandler} from '@taiga-ui/cdk';
import {TUI_TRUE_HANDLER} from '@taiga-ui/cdk';

Expand Down Expand Up @@ -32,22 +32,9 @@ export default class Example {
protected iconStart = this.iconVariants[0]!;
protected iconEnd = this.iconVariants[0]!;

protected readonly paymentSystemVariants: readonly TuiPaymentSystem[] = [
'mastercard',
'amex',
'dinersclub',
'discover',
'electron',
'humo',
'jcb',
'maestro',
'mir',
'rupay',
'unionpay',
'uzcard',
'verve',
'visa',
];
protected readonly paymentSystemVariants = Object.keys(
inject(TUI_PAYMENT_SYSTEM_ICONS),
) as readonly TuiPaymentSystem[];

protected readonly sizeVariants: ReadonlyArray<TuiThumbnailCard['size']> = [
'l',
Expand Down

0 comments on commit 207c974

Please sign in to comment.