Loading...
Loading...
Compare original and translation side by side
e-dark-modee-dark-modee-iconse-iconsnpm install @syncfusion/ej2-angular-buttons@latest --save/* src/styles.css */
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/tailwind3.css";<!-- angular.json - Add to styles array -->
"styles": [
"https://cdn.syncfusion.com/ej2/32.1.19/tailwind3.css"
]npm install @syncfusion/ej2-angular-buttons@latest --save/* src/styles.css */
@import "../node_modules/@syncfusion/ej2-base/styles/tailwind3.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/tailwind3.css";<!-- angular.json - 添加到styles数组 -->
"styles": [
"https://cdn.syncfusion.com/ej2/32.1.19/tailwind3.css"
]import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<div>
<ejs-checkbox
label="Enable Dark Mode"
[checked]="isDarkMode"
(change)="handleDarkModeToggle($event)">
</ejs-checkbox>
<ejs-button cssClass="e-primary">Sample Button</ejs-button>
</div>
`
})
export class AppComponent {
isDarkMode = false;
handleDarkModeToggle(event: any): void {
this.isDarkMode = event.checked ?? false;
if (this.isDarkMode) {
document.body.classList.add('e-dark-mode');
} else {
document.body.classList.remove('e-dark-mode');
}
}
}import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<div>
<ejs-checkbox
label="Enable Dark Mode"
[checked]="isDarkMode"
(change)="handleDarkModeToggle($event)">
</ejs-checkbox>
<ejs-button cssClass="e-primary">Sample Button</ejs-button>
</div>
`
})
export class AppComponent {
isDarkMode = false;
handleDarkModeToggle(event: any): void {
this.isDarkMode = event.checked ?? false;
if (this.isDarkMode) {
document.body.classList.add('e-dark-mode');
} else {
document.body.classList.remove('e-dark-mode');
}
}
}/* src/styles.css */
:root {
--color-sf-primary: #ff6b35; /* Custom orange */
}/* src/styles.css */
:root {
--color-sf-primary: 255, 107, 53; /* RGB: Custom orange */
}/* src/styles.css */
:root {
--color-sf-primary: #ff6b35; /* Custom orange */
}/* src/styles.css */
:root {
--color-sf-primary: 255, 107, 53; /* RGB: Custom orange */
}<!-- index.html -->
<body class="e-bigger">
<app-root></app-root>
</body><ejs-button cssClass="e-bigger">Touch-Friendly Button</ejs-button><!-- index.html -->
<body class="e-bigger">
<app-root></app-root>
</body><ejs-button cssClass="e-bigger">Touch-Friendly Button</ejs-button>/* src/styles.css - Lite version without bigger mode styles */
@import "@syncfusion/ej2/tailwind3-lite.css";/* src/styles.css - 精简版,不含更大尺寸模式样式 */
@import "@syncfusion/ej2/tailwind3-lite.css";npm install @syncfusion/ej2-icons/@latest/* src/styles.css */
@import "../node_modules/@syncfusion/ej2-icons/styles/tailwind3.css";<span class="e-icons e-cut"></span>
<span class="e-icons e-medium e-copy"></span>
<span class="e-icons e-large e-paste"></span>npm install @syncfusion/ej2-icons/@latest/* src/styles.css */
@import "../node_modules/@syncfusion/ej2-icons/styles/tailwind3.css";<span class="e-icons e-cut"></span>
<span class="e-icons e-medium e-copy"></span>
<span class="e-icons e-large e-paste"></span>