UNPKG

rn-inkpad

Version:

<img src="https://res.cloudinary.com/fercloudinary/image/upload/v1715452841/packages/inkpad-banner_acl0xl.png" />

34 lines (33 loc) 1.44 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ActionButton = void 0; const react_1 = __importDefault(require("react")); const react_native_1 = require("react-native"); const theme_1 = require("../../theme"); const Icon_1 = require("../icon/Icon"); const ActionButton = ({ align, backgroundColor, icon, iconColor, iconSize = 22, onPress, margin = 0, size = 50, text, }) => { return (<react_native_1.View style={[ theme_1.fabStyles.btnContainer, { flexDirection: align === 'left' ? 'row-reverse' : 'row' }, ]}> {!!text && (<react_native_1.View style={theme_1.fabStyles.textContainer}> <react_native_1.Text>{text}</react_native_1.Text> </react_native_1.View>)} <react_native_1.TouchableOpacity onPress={onPress} activeOpacity={0.7} style={[ theme_1.fabStyles.fab, { width: size, marginTop: 5, marginHorizontal: margin, height: size, backgroundColor: backgroundColor ?? '#464EE5', }, ]}> <Icon_1.Icon name={icon} color={iconColor ?? '#FFF'} size={iconSize}/> </react_native_1.TouchableOpacity> </react_native_1.View>); }; exports.ActionButton = ActionButton;