MCPcopy Create free account
hub / github.com/adrianhajdin/uber / CustomButton

Function CustomButton

components/CustomButton.tsx:35–58  ·  view source on GitHub ↗
({
  onPress,
  title,
  bgVariant = "primary",
  textVariant = "default",
  IconLeft,
  IconRight,
  className,
  ...props
}: ButtonProps)

Source from the content-addressed store, hash-verified

33};
34
35const CustomButton = ({
36 onPress,
37 title,
38 bgVariant = "primary",
39 textVariant = "default",
40 IconLeft,
41 IconRight,
42 className,
43 ...props
44}: ButtonProps) => {
45 return (
46 <TouchableOpacity
47 onPress={onPress}
48 className={`w-full rounded-full p-3 flex flex-row justify-center items-center shadow-md shadow-neutral-400/70 ${getBgVariantStyle(bgVariant)} ${className}`}
49 {...props}
50 >
51 {IconLeft && <IconLeft />}
52 <Text className={`text-lg font-bold ${getTextVariantStyle(textVariant)}`}>
53 {title}
54 </Text>
55 {IconRight && <IconRight />}
56 </TouchableOpacity>
57 );
58};
59
60export default CustomButton;

Callers

nothing calls this directly

Calls 2

getBgVariantStyleFunction · 0.85
getTextVariantStyleFunction · 0.85

Tested by

no test coverage detected