UNPKG

respond-framework

Version:
48 lines (47 loc) 1.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react2 = require("react"); var React = _react2; var _respond = require("respond-framework/modules/replayTools/respond.js"); var _reactNative = require("react-native"); var _Pressable = require("../widgets/Pressable.js"); const SpliceModeButton = (0, _react2.memo)(function SpliceModeButton(props) { return ((props, { events, spliceMode }) => /*#__PURE__*/React.createElement(_Pressable.default, { style: s.c, event: events.toggleSpliceMode }, /*#__PURE__*/React.createElement(_reactNative.View, { style: spliceMode ? s.enabled : s.disabled })))(props, (0, _respond.useRespond)()); }); var _default = exports.default = SpliceModeButton; const s = _reactNative.StyleSheet.create({ c: { position: 'absolute', top: 13, right: 10, width: 16, height: 16, backgroundColor: 'rgb(72, 72, 72)', borderRadius: 8, alignItems: 'center', justifyContent: 'center' }, enabled: { width: 10, height: 10, backgroundColor: 'rgb(190, 78, 238)', borderRadius: 5 }, disabled: { width: 10, height: 10, backgroundColor: 'rgb(123, 123, 123)', borderRadius: 5 } });