diff --git a/projects/demo/src/modules/info/browsers/browsers.component.ts b/projects/demo/src/modules/info/browsers/browsers.component.ts index c2eb09638e00..d4bca27277c4 100644 --- a/projects/demo/src/modules/info/browsers/browsers.component.ts +++ b/projects/demo/src/modules/info/browsers/browsers.component.ts @@ -1,13 +1,32 @@ -import {Component} from '@angular/core'; -import {changeDetection} from '@demo/emulate/change-detection'; +import {NgFor, NgIf} from '@angular/common'; +import {ChangeDetectionStrategy, Component} from '@angular/core'; import {TuiDocPageModule} from '@taiga-ui/addon-doc'; @Component({ standalone: true, - selector: 'browsers', - imports: [TuiDocPageModule], + selector: 'browser-support', + imports: [TuiDocPageModule, NgFor, NgIf], templateUrl: './browsers.template.html', - styleUrls: ['./browsers.style.less'], - changeDetection, + styles: ['td {width: 18.75rem}'], + changeDetection: ChangeDetectionStrategy.OnPush, }) -export default class BrowsersComponent {} +export default class BrowserSupportComponent { + readonly desktopBrowsers = [ + {name: 'Google Chrome', version: '88+'}, + {name: 'Mozilla Firefox', version: '120+'}, + {name: 'Safari', version: '13.1+'}, + {name: 'Opera', version: '74+'}, + {name: 'Edge', version: '88+'}, + {name: 'Yandex Browser', version: '21.2+'}, + {name: 'Microsoft Internet Explorer', version: null}, + ] as const; + + readonly mobileBrowsers = [ + {name: 'Google Chrome', version: '88+'}, + {name: 'Mozilla Firefox', version: '120+'}, + {name: 'Safari', version: '13.4+'}, + {name: 'Opera', version: '63+'}, + {name: 'Samsung Mobile', version: '15+'}, + {name: 'Yandex Browser', version: '21.2+'}, + ]; +} diff --git a/projects/demo/src/modules/info/browsers/browsers.style.less b/projects/demo/src/modules/info/browsers/browsers.style.less deleted file mode 100644 index 82c465ed9c72..000000000000 --- a/projects/demo/src/modules/info/browsers/browsers.style.less +++ /dev/null @@ -1,7 +0,0 @@ -:host { - display: block; -} - -.cell { - width: 18.75rem; -} diff --git a/projects/demo/src/modules/info/browsers/browsers.template.html b/projects/demo/src/modules/info/browsers/browsers.template.html index b98aad6619b4..2d2696597dc6 100644 --- a/projects/demo/src/modules/info/browsers/browsers.template.html +++ b/projects/demo/src/modules/info/browsers/browsers.template.html @@ -6,40 +6,15 @@

Desktop

Browser Version - - Google Chrome - 74+ - - - Yandex.Browser - 19+ - - - Safari - 12.1+ - - - Mozilla Firefox - 55+ - - - Opera - 62+ - - - Edge (Chromium) - 80+ - - - Microsoft Internet Explorer - - Not supported - - - - Edge (EdgeHTML) + + {{ browser.name }} - Not supported + + {{ browser.version }} + @@ -51,30 +26,17 @@

Mobile

Browser Version - - Google Chrome - 90+ - - - Safari - 12.2+ - - - Yandex.Browser - 19+ - - - Mozilla Firefox - 99+ - - - Opera Mobile - 64+ - - - UC Browser - 13.4+ + + {{ browser.name }} + {{ browser.version }} + + + Not supported +