@uifabric/experiments
Version:
Experimental React components for building experiences for Microsoft 365.
17 lines • 730 B
JavaScript
define(["require", "exports", "tslib", "react"], function (require, exports, tslib_1, react_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/* eslint-disable deprecation/deprecation */
/** @deprecated */
exports.useButtonState = function (props) {
var buttonRef = react_1.useRef(null);
react_1.useImperativeHandle(props.componentRef, function () { return ({
focus: function () {
buttonRef.current && buttonRef.current.focus();
},
}); });
var viewProps = tslib_1.__assign(tslib_1.__assign({}, props), { buttonRef: buttonRef });
return viewProps;
};
});
//# sourceMappingURL=Button.state.js.map