Refactor #4211 - For ToggleButton

This commit is contained in:
Tuğçe Küçükoğlu 2023-08-02 17:32:32 +03:00
parent 991369ff6e
commit 9672b27cf0
2 changed files with 35 additions and 4 deletions

View file

@ -20,6 +20,7 @@ export interface ToggleButtonPassThroughMethodOptions {
instance: any;
props: ToggleButtonProps;
state: ToggleButtonState;
context: ToggleButtonContext;
}
/**
@ -66,11 +67,32 @@ export interface ToggleButtonPassThroughAttributes {
*/
export interface ToggleButtonState {
/**
* Focused state as a number.
* Focused state as a boolean.
*/
focused: boolean;
}
/**
* Defines current options in ToggleButton component.
*/
export interface ToggleButtonContext {
/**
* Current focused state as a boolean.
* @defaultValue false
*/
focused: boolean;
/**
* Current disabled state as a boolean.
* @defaultValue false
*/
disabled: boolean;
/**
* Current highlighted state as a boolean.
* @defaultValue false
*/
highlighted: boolean;
}
/**
* Defines valid properties in ToggleButton component.
*/