mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 00:24:53 +00:00
main menu change
This commit is contained in:
36
components/shared/DrawerButton.tsx
Normal file
36
components/shared/DrawerButton.tsx
Normal file
@ -0,0 +1,36 @@
|
||||
import React from "react";
|
||||
import { Button, View, Text } from "react-native-ui-lib";
|
||||
interface IDrawerButtonProps {
|
||||
bgColor: string;
|
||||
color: string;
|
||||
pressFunc: () => void;
|
||||
icon: React.ReactNode;
|
||||
title: string;
|
||||
}
|
||||
const DrawerButton = (props: IDrawerButtonProps) => {
|
||||
return (
|
||||
<Button
|
||||
onPress={props.pressFunc}
|
||||
label={props.title}
|
||||
labelStyle={{fontSize: 14}}
|
||||
color={props.color}
|
||||
backgroundColor="white"
|
||||
iconSource={() => (
|
||||
<View
|
||||
backgroundColor={props.bgColor}
|
||||
width={60}
|
||||
height={60}
|
||||
style={{ borderRadius: 50 }}
|
||||
centerV
|
||||
centerH
|
||||
>
|
||||
{props.icon}
|
||||
</View>
|
||||
)}
|
||||
style={{ aspectRatio: 1, borderRadius: 15, marginBottom: 12, flexDirection: 'column', justifyContent: "space-between", paddingVertical: 15 }}
|
||||
>
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
export default DrawerButton;
|
||||
Reference in New Issue
Block a user