This repository has been archived on 2024-09-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
front/node_modules/@mui/utils/useControlled/useControlled.d.ts
2024-09-18 13:34:19 -03:00

23 lines
531 B
TypeScript

export interface UseControlledProps<T = unknown> {
/**
* Holds the component value when it's controlled.
*/
controlled: T | undefined;
/**
* The default value when uncontrolled.
*/
default: T | undefined;
/**
* The component name displayed in warnings.
*/
name: string;
/**
* The name of the state variable displayed in warnings.
*/
state?: string;
}
export default function useControlled<T = unknown>(
props: UseControlledProps<T>,
): [T, (newValue: T | ((prevValue: T) => T)) => void];