@uifabric/experiments
Version:
Experimental React components for building experiences for Microsoft 365.
15 lines • 562 B
JavaScript
import { __assign } from "tslib";
import { useImperativeHandle, useRef } from 'react';
/* eslint-disable deprecation/deprecation */
/** @deprecated */
export var useActionableState = function (props) {
var buttonRef = useRef(null);
useImperativeHandle(props.componentRef, function () { return ({
focus: function () {
buttonRef.current && buttonRef.current.focus();
},
}); });
var viewProps = __assign(__assign({}, props), { buttonRef: buttonRef });
return viewProps;
};
//# sourceMappingURL=Actionable.state.js.map