UNPKG

@fluentui/react

Version:

Reusable React components for building web experiences.

22 lines 917 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.KeytipData = void 0; var tslib_1 = require("tslib"); var index_1 = require("../../utilities/keytips/index"); var useKeytipData_1 = require("./useKeytipData"); /** * A small element to help the target component correctly read out its aria-describedby for its Keytip * {@docCategory Keytips} */ var KeytipData = function (props) { var _a; var children = props.children, keytipDataProps = tslib_1.__rest(props, ["children"]); var _b = (0, useKeytipData_1.useKeytipData)(keytipDataProps), keytipId = _b.keytipId, ariaDescribedBy = _b.ariaDescribedBy; return children((_a = {}, _a[index_1.DATAKTP_TARGET] = keytipId, _a[index_1.DATAKTP_EXECUTE_TARGET] = keytipId, _a['aria-describedby'] = ariaDescribedBy, _a)); }; exports.KeytipData = KeytipData; //# sourceMappingURL=KeytipData.js.map