@ray-js/components
Version:
Ray basic components
27 lines • 876 B
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
const _excluded = ["onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
import * as React from 'react';
import { Text as RemaxText } from '@ray-core/wechat';
import { useTouch } from '@ray-js/framework-shared';
const Text = props => {
const {
onClick,
onLongClick,
onTouchCancel,
onTouchEnd,
onTouchMove,
onTouchStart
} = props,
restProps = _objectWithoutProperties(props, _excluded);
const [touching, handlers] = useTouch({
onLongClick,
onTouchStart,
onTouchMove,
onTouchEnd,
onTouchCancel,
onClick
});
return /*#__PURE__*/React.createElement(RemaxText, _extends({}, restProps, handlers));
};
export default Text;