feat(dx): Improve hinted string types (#5286)

This commit is contained in:
Fahad 2024-02-23 14:38:50 +06:00 committed by GitHub
parent 2011f702a3
commit 8f0d3188cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 60 additions and 58 deletions

View file

@ -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