deskripsi: - new component Clickable - new folder (image) untuk take picture dan imaga preview - fix klik gambar # No Issue
37 lines
632 B
TypeScript
37 lines
632 B
TypeScript
import { StyleSheet, TouchableOpacity } from "react-native";
|
|
|
|
export default function ClickableCustom({
|
|
children,
|
|
onPress,
|
|
disabled,
|
|
style,
|
|
...props
|
|
}: {
|
|
children: React.ReactNode;
|
|
onPress: () => void;
|
|
disabled?: boolean;
|
|
style?: any;
|
|
[key: string]: any;
|
|
}) {
|
|
return (
|
|
<>
|
|
<TouchableOpacity
|
|
activeOpacity={0.7}
|
|
onPress={onPress}
|
|
disabled={disabled}
|
|
style={[styles.container, style]}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</TouchableOpacity>
|
|
</>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
width: "100%",
|
|
height: "auto",
|
|
},
|
|
});
|