Commit ce2b6b65 by G

basic button built on top of ButtonBase

parent f2a02190
import type { BoxProps, VariantProps } from "@shopify/restyle";
import type { Theme } from "@themes/Theme";
import { TouchableOpacity } from "react-native";
import Card from "./Card";
import Box from "./bases/Box";
import ButtonBase from "./bases/ButtonBase";
import Text from "./bases/Text";
type Props = BoxProps<Theme> &
VariantProps<Theme, "buttonVariants"> &
VariantProps<Theme, "textVariants", "textVariants"> & {
label: string;
onPress: () => void;
};
const Button = ({ onPress, label, textVariants, variant, ...rest }: Props) => {
return (
<TouchableOpacity>
<ButtonBase variant={variant} justifyContent="center" alignItems="center" {...rest}>
<Text variant={textVariants}>{label}</Text>
</ButtonBase>
</TouchableOpacity>
);
};
export default Button;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment