-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
870bfea
commit 2805862
Showing
3 changed files
with
91 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,35 @@ | ||
import type { ComputedRef } from 'vue'; | ||
|
||
import type { Nullable } from '#/helpers'; | ||
import type { Nullable, ClassValue } from '#/helpers'; | ||
|
||
export type QButtonPropType = 'default' | 'icon'; | ||
export type QButtonPropTheme = 'primary' | 'secondary' | 'link'; | ||
export type QButtonPropSize = 'small' | 'medium'; | ||
type NativeType = 'button' | 'submit' | 'reset'; | ||
|
||
export type QButtonPropType = Nullable<'default' | 'icon'>; | ||
export type QButtonPropTheme = Nullable<'primary' | 'secondary' | 'link'>; | ||
export type QButtonPropSize = Nullable<'small' | 'medium'>; | ||
export type QButtonPropIcon = Nullable<ClassValue>; | ||
export type QButtonPropNativeType = Nullable<NativeType>; | ||
export type QButtonPropLoading = Nullable<boolean>; | ||
export type QButtonPropDisabled = Nullable<boolean>; | ||
export type QButtonPropAutofocus = Nullable<boolean>; | ||
export type QButtonPropCircle = Nullable<boolean>; | ||
export type QButtonPropFullWidth = Nullable<boolean>; | ||
|
||
export interface QButtonProps { | ||
type: QButtonPropType; | ||
theme: QButtonPropTheme; | ||
size: QButtonPropSize; | ||
icon: Nullable<string>; | ||
nativeType: Nullable<string>; | ||
loading: Nullable<boolean>; | ||
disabled: Nullable<boolean>; | ||
autofocus: Nullable<boolean>; | ||
circle: Nullable<boolean>; | ||
fullWidth: Nullable<boolean>; | ||
icon: QButtonPropIcon; | ||
nativeType: QButtonPropNativeType; | ||
loading: QButtonPropLoading; | ||
disabled: QButtonPropDisabled; | ||
autofocus: QButtonPropAutofocus; | ||
circle: QButtonPropCircle; | ||
fullWidth: QButtonPropFullWidth; | ||
} | ||
|
||
export interface QButtonInstance { | ||
classList: ComputedRef<(string | Record<string, boolean>)[]>; | ||
isDisabled: ComputedRef<boolean>; | ||
isLoading: ComputedRef<boolean>; | ||
classList: ComputedRef<ClassValue[]>; | ||
} |