UNPKG

@ramses-superapp/ramses-ui

Version:

Skinless UI primitives for Ramses Built Apps

28 lines (27 loc) 677 B
"use strict"; import { forwardRef } from 'react'; import { Pressable } from 'react-native'; import { jsx as _jsx } from "react/jsx-runtime"; const RsToggleButton = /*#__PURE__*/forwardRef(({ value, onToggle, disabled, style, accessibilityLabel }, ref) => { return /*#__PURE__*/_jsx(Pressable, { ref: ref, onPress: () => onToggle(!value), disabled: disabled, style: style, accessibilityRole: "switch", accessibilityLabel: accessibilityLabel, accessibilityState: { checked: value, disabled } }); }); RsToggleButton.displayName = 'RsToggleButton'; export default RsToggleButton; //# sourceMappingURL=RsToggleButton.js.map