mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
feat(dx): Improve hinted string types (#5286)
This commit is contained in:
parent
2011f702a3
commit
8f0d3188cd
26 changed files with 60 additions and 58 deletions
6
components/lib/button/Button.d.ts
vendored
6
components/lib/button/Button.d.ts
vendored
|
@ -10,7 +10,7 @@
|
|||
import { ButtonHTMLAttributes, VNode } from 'vue';
|
||||
import { ComponentHooks } from '../basecomponent';
|
||||
import { PassThroughOptions } from '../passthrough';
|
||||
import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers';
|
||||
import { ClassComponent, GlobalComponentConstructor, PassThrough, HintedString } from '../ts-helpers';
|
||||
|
||||
export declare type ButtonPassThroughOptionType<T = any> = ButtonPassThroughAttributes | ((options: ButtonPassThroughMethodOptions<T>) => ButtonPassThroughAttributes | string) | string | null | undefined;
|
||||
|
||||
|
@ -119,7 +119,7 @@ export interface ButtonProps extends ButtonHTMLAttributes {
|
|||
/**
|
||||
* Severity type of the badge.
|
||||
*/
|
||||
badgeSeverity?: 'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'contrast' | string | null | undefined;
|
||||
badgeSeverity?: HintedString<'secondary' | 'info' | 'success' | 'warning' | 'danger' | 'contrast'> | null | undefined;
|
||||
/**
|
||||
* Whether the button is in loading state.
|
||||
* @defaultValue false
|
||||
|
@ -137,7 +137,7 @@ export interface ButtonProps extends ButtonHTMLAttributes {
|
|||
/**
|
||||
* Defines the style of the button.
|
||||
*/
|
||||
severity?: 'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger' | 'contrast' | string | undefined;
|
||||
severity?: HintedString<'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger' | 'contrast'> | undefined;
|
||||
/**
|
||||
* Add a shadow to indicate elevation.
|
||||
* @defaultValue false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue