@ramses-superapp/ramses-ui
Version:
Skinless UI primitives for Ramses Built Apps
35 lines (34 loc) • 810 B
JavaScript
;
import { forwardRef } from 'react';
import { Pressable, Text } from 'react-native';
import { jsx as _jsx } from "react/jsx-runtime";
const RsButton = /*#__PURE__*/forwardRef(({
label,
children,
onPress,
onLongPress,
disabled,
style,
labelStyle,
accessibilityLabel
}, ref) => {
return /*#__PURE__*/_jsx(Pressable, {
ref: ref,
onPress: onPress,
onLongPress: onLongPress,
disabled: disabled,
style: style,
accessibilityRole: "button",
accessibilityLabel: accessibilityLabel,
accessibilityState: {
disabled
},
children: children ?? (label ? /*#__PURE__*/_jsx(Text, {
style: labelStyle,
children: label
}) : null)
});
});
RsButton.displayName = 'RsButton';
export default RsButton;
//# sourceMappingURL=RsButton.js.map