
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@libs-ui/components-buttons-button
Advanced tools
@libs-ui/components-buttons-button
là một component Button linh hoạt dùng cho ứng dụng Angular. Component này hỗ trợ:
pending
) và disabledbutton-primary
, button-secondary
, button-third
, button-outline
, button-outline-green
, button-link
, button-custom
large
| medium
| small
| smaller
isPending
disable
npm install @libs-ui/components-buttons-button
hoặc
yarn add @libs-ui/components-buttons-button
import { Component } from '@angular/core';
import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
@Component({
selector: 'app-example',
standalone: true,
imports: [LibsUiComponentsButtonsButtonComponent],
template: `
<libs_ui-components-buttons-button
[type]="'button-primary'"
[label]="'Click me'"
(outClick)="onClick()">
</libs_ui-components-buttons-button>
`
})
export class ExampleComponent {
onClick() {
console.log('Clicked');
}
}
import { Component } from '@angular/core';
import { LibsUiComponentsButtonsButtonComponent } from '@libs-ui/components-buttons-button';
@Component({
selector: 'app-example',
standalone: true,
imports: [LibsUiComponentsButtonsButtonComponent],
templateUrl: './example.component.html'
})
export class ExampleComponent {}
<libs_ui-components-buttons-button
[type]="'button-secondary'"
[label]="'Submit'">
</libs_ui-components-buttons-button>
Tên | Kiểu | Mặc định | Mô tả |
---|---|---|---|
type | TYPE_BUTTON | button-primary | Kiểu style của nút (ví dụ: button-primary, button-secondary, ...). |
sizeButton | TYPE_SIZE_BUTTON | medium | Kích thước của nút (large, medium, small, smaller). |
label | string | ' ' | Nội dung text hiển thị trên nút. |
disable | boolean | false | Nếu true: vô hiệu hóa nút, không cho tương tác. |
isPending | boolean | false | Nếu true: hiển thị trạng thái loading và vô hiệu hóa nút. |
popover | IPopover | {} | Cấu hình chi tiết cho popover (nội dung, vị trí, chế độ hiển thị). |
buttonCustom | IColorButton | undefined | Cấu hình màu custom khi type là button-custom hoặc button-link-custom. |
imageLeft | { src: string; classInclude?: string } | undefined | Thêm image/icon bên trái nút. |
classInclude | string | '' | Class CSS thêm cho container nút. |
classIconLeft | string | '' | Class CSS thêm cho icon bên trái. |
classIconRight | string | '' | Class CSS thêm cho icon bên phải. |
classLabel | string | '' | Class CSS thêm cho nhãn (label). |
iconOnlyType | boolean | false | Chỉ hiển thị icon, không hiển thị nhãn. |
ignoreStopPropagationEvent | boolean | true | Cho phép ngăn chặn hoặc không propagation sự kiện click. |
zIndex | number | 10 | Giá trị z-index của popover. |
widthLabelPopover | number | undefined | Chiều rộng của label popover (px). |
styleIconLeft | Record<string, any> | undefined | Style inline cho icon trái. |
styleButton | Record<string, any> | undefined | Style inline cho button. |
ignoreFocusWhenInputTab | boolean | undefined | Bỏ qua focus khi nhấn Tab. |
ignoreSetClickWhenShowPopover | boolean | undefined | Bỏ qua set click khi show popover. |
ignorePointerEvent | boolean | undefined | Bỏ qua pointer events. |
isActive | boolean | undefined | Trạng thái active của button. |
isHandlerEnterDocumentClickButton | boolean | undefined | Cho phép xử lý event Enter trên document. |
Tên | Kiểu | Mô tả |
---|---|---|
outClick | (event: Event) => void | Phát ra khi người dùng click vào nút. |
outPopoverEvent | (event: TYPE_POPOVER_EVENT) => void | Phát ra các sự kiện của popover (show, hide, click). |
outFunctionsControl | (control: IPopoverFunctionControlEvent) => void | Cung cấp API để điều khiển popover. |
TYPE_BUTTON
export type TYPE_BUTTON =
'button-primary'
| 'button-primary-revert'
| 'button-secondary'
| 'button-secondary-red'
| 'button-outline-secondary'
| 'button-third'
| 'button-outline'
| 'button-danger-high'
| 'button-outline-hover-danger'
| 'button-third-hover-danger'
| 'button-danger-low'
| 'button-green'
| 'button-violet'
| 'button-secondary-green'
| 'button-outline-green'
| 'button-custom'
| 'button-link-primary'
| 'button-link-third'
| 'button-link-danger-high'
| 'button-link-danger-low'
| 'button-link-green'
| 'button-link-violet'
| 'button-link-custom'
| string;
Mô tả: Các giá trị style của nút được hỗ trợ.
TYPE_SIZE_BUTTON
export type TYPE_SIZE_BUTTON = 'large' | 'medium' | 'small' | 'smaller';
Mô tả: Các giá trị kích thước của nút được hỗ trợ.
IPopover
export interface IPopover {
type?: TYPE_POPOVER_TYPE;
mode?: TYPE_POPOVER_MODE;
dataView?: string;
config?: IPopoverOverlay;
classInclude?: string;
ignoreShowPopover?: boolean;
}
Mô tả: Cấu hình chi tiết cho popover (nội dung, vị trí, chế độ hiển thị).
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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.