UNPKG

1.5 kBJavaScriptView Raw
1import {usePress as $f6c31cce2adf654f$export$45712eceda6fad21} from "./usePress.module.js";
2import {useObjectRef as $hhDyF$useObjectRef, mergeProps as $hhDyF$mergeProps} from "@react-aria/utils";
3import $hhDyF$react from "react";
4
5/*
6 * Copyright 2020 Adobe. All rights reserved.
7 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License. You may obtain a copy
9 * of the License at http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software distributed under
12 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
13 * OF ANY KIND, either express or implied. See the License for the specific language
14 * governing permissions and limitations under the License.
15 */
16
17
18const $3b117e43dc0ca95d$export$27c701ed9e449e99 = /*#__PURE__*/ (0, $hhDyF$react).forwardRef(({ children: children, ...props }, ref)=>{
19 ref = (0, $hhDyF$useObjectRef)(ref);
20 let { pressProps: pressProps } = (0, $f6c31cce2adf654f$export$45712eceda6fad21)({
21 ...props,
22 ref: ref
23 });
24 let child = (0, $hhDyF$react).Children.only(children);
25 return /*#__PURE__*/ (0, $hhDyF$react).cloneElement(child, // @ts-ignore
26 {
27 ref: ref,
28 ...(0, $hhDyF$mergeProps)(child.props, pressProps)
29 });
30});
31
32
33export {$3b117e43dc0ca95d$export$27c701ed9e449e99 as Pressable};
34//# sourceMappingURL=Pressable.module.js.map