UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Microsoft 365.

15 lines 554 B
import { __assign } from "tslib"; import { useImperativeHandle, useRef } from 'react'; /* eslint-disable deprecation/deprecation */ /** @deprecated */ export var useButtonState = 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=Button.state.js.map