
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
@libs-ui/components-buttons-status
Advanced tools
@libs-ui/components-buttons-status là một component hiển thị trạng thái dưới dạng button, hỗ trợ nhiều kiểu màu khác nhau và tuỳ chỉnh thông tin popover.
type (blue, green, red, orange, yellow, cyan, purple, brown, other)otherpopoverIconLeft/popoverIconRightclassInclude, classLabelInclude, classIconLeft, classIconRightnpm install @libs-ui/components-buttons-status
hoặc
yarn add @libs-ui/components-buttons-status
import { Component } from '@angular/core';
import { LibsUiComponentsButtonsStatusComponent, IButtonStatus, TYPE_BUTTON_STATUS } from '@libs-ui/components-buttons-status';
@Component({
selector: 'app-example',
standalone: true,
imports: [LibsUiComponentsButtonsStatusComponent],
template: `
<libs_ui-components-buttons-status [config]="statusConfig"></libs_ui-components-buttons-status>
`,
})
export class ExampleComponent {
statusConfig: IButtonStatus = {
label: 'Đang hoạt động',
type: 'green',
};
}
import { Component } from '@angular/core';
import { LibsUiComponentsButtonsStatusComponent, IButtonStatus } from '@libs-ui/components-buttons-status';
@Component({
selector: 'app-example',
standalone: true,
imports: [LibsUiComponentsButtonsStatusComponent],
templateUrl: './example.component.html',
})
export class ExampleComponent {
statusConfig: IButtonStatus = { label: 'Đang chờ', type: 'yellow' };
}
<libs_ui-components-buttons-status [config]="statusConfig"></libs_ui-components-buttons-status>
| Tên | Kiểu | Mặc định | Mô tả |
|---|---|---|---|
| config | IButtonStatus | required | Thông tin cấu hình cho trạng thái (nhãn, màu, icon, popover). |
Không có
IButtonStatusexport interface IButtonStatus {
label?: string;
type: TYPE_BUTTON_STATUS;
otherConfig?: {
color: string;
background?: string;
};
classInclude?: string;
classLabelInclude?: string;
classIconLeft?: string;
popoverIconLeft?: IPopover;
classIconRight?: string;
popoverIconRight?: IPopover;
}
Mô tả:
label: Nhãn hiển thị của trạng thái.type: Kiểu màu/trạng thái (TYPE_BUTTON_STATUS).otherConfig: Cấu hình màu chữ và nền khi type là other.classInclude: CSS class thêm cho container của status.classLabelInclude: CSS class thêm cho nhãn.classIconLeft: CSS class thêm cho icon bên trái.popoverIconLeft: Cấu hình popover cho icon bên trái.classIconRight: CSS class thêm cho icon bên phải.popoverIconRight: Cấu hình popover cho icon bên phải.TYPE_BUTTON_STATUSexport type TYPE_BUTTON_STATUS = 'blue' | 'green' | 'red' | 'orange' | 'yellow' | 'cyan' | 'purple' | 'brown' | 'other';
Mô tả:
blue: Màu xanh dương (thông tin chung).green: Màu xanh lá cây (thành công).red: Màu đỏ (lỗi hoặc cảnh báo).orange: Màu cam (cảnh báo).yellow: Màu vàng (đang chờ, thông tin).cyan: Màu xanh da trời (thông tin phụ trợ).purple: Màu tím (nhấn mạnh, nổi bật).brown: Màu nâu (trung tính).other: Chủ đề tuỳ chỉnh; cấu hình qua otherConfig.FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.