@wordpress/components
Version:
UI components for WordPress.
34 lines • 972 B
TypeScript
/**
* External dependencies
*/
import type { FocusEventHandler } from 'react';
/**
* Internal dependencies
*/
import type { InputChangeCallback } from './types';
/**
* Gets a CSS cursor value based on a drag direction.
*
* @param dragDirection The drag direction.
* @return The CSS cursor value.
*/
export declare function getDragCursor(dragDirection: string): string;
/**
* Custom hook that renders a drag cursor when dragging.
*
* @param {boolean} isDragging The dragging state.
* @param {string} dragDirection The drag direction.
*
* @return {string} The CSS cursor value.
*/
export declare function useDragCursor(isDragging: boolean, dragDirection: string): string;
export declare function useDraft(props: {
value: string | undefined;
onBlur?: FocusEventHandler;
onChange: InputChangeCallback;
}): {
value: string | undefined;
onBlur: FocusEventHandler;
onChange: InputChangeCallback;
};
//# sourceMappingURL=utils.d.ts.map