react-native-simi-comps
Version:
Simple Minimal Components for React Native
21 lines • 1.04 kB
JavaScript
import React from "react";
import { Pressable } from "react-native";
import IconButton from "./IconButton";
import Text from "./Text";
import View from "./View";
export default function Chip(_a) {
var text = _a.text, onTextPress = _a.onTextPress, onRemove = _a.onRemove, _b = _a.inline, inline = _b === void 0 ? true : _b;
return (React.createElement(View, { style: inline
? {
marginRight: 4,
marginVertical: 4,
overflow: "hidden",
flexShrink: 1
}
: undefined },
React.createElement(View, { row: true, bordered: true, style: { borderRadius: 16, paddingRight: 2 } },
React.createElement(Pressable, { onPress: onTextPress, style: { paddingLeft: 12, flexShrink: 1 } },
React.createElement(Text, { text: text, numberOfLines: 1 })),
onRemove !== undefined && (React.createElement(IconButton, { onPress: onRemove, icon: "x", size: 14, bordered: false })))));
}
//# sourceMappingURL=Chip.js.map