UNPKG

expo-dynamic-image-crop

Version:

Dynamic image cropping component for Expo/React Native with free-form and fixed aspect ratio support

21 lines (20 loc) 796 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Feather, MaterialIcons } from "@expo/vector-icons"; import { StyleSheet, Text, View } from "react-native"; export function Icon({ text, iconID, color }) { return (_jsxs(View, { style: styles.container, children: [iconID === "x" ? (_jsx(Feather, { name: iconID, size: 26, color: color })) : (_jsx(MaterialIcons, { name: iconID, size: 26, color: color })), _jsx(Text, { style: styles.text, children: text })] })); } const styles = StyleSheet.create({ container: { height: 64, width: 80, flexDirection: "column", justifyContent: "space-between", alignItems: "center", paddingVertical: 8, }, text: { color: "#fff", textAlign: "center", }, });