import React from 'react';
import { Image, PixelRatio, StyleSheet, TouchableOpacity, View } from 'react-native';
import { ToolboxImage } from '../enums/ToolboxImage.enum';
const width: number = 48;
const height: number = 48;
const buttonWidth: number = 48;
const buttonHeight: number = 48;
const iconWidth: number = 20;
const iconHeight: number = 20;
interface Props {
fileIndex: ToolboxImage,
onPress: () => void;
style?: {},
width?: number,
height?: number,
backgroundColor?: string,
buttonWidth?: number,
buttonHeight?: number,
iconWidth?: number,
iconHeight?: number
}
const Button = (props: Props) => {
const getImage = () => {
switch (props.fileIndex) {
case ToolboxImage.Audio:
return
case ToolboxImage.NoAudio:
return
case ToolboxImage.Video:
return
case ToolboxImage.NoVideo:
return
case ToolboxImage.Hangup:
return
}
}
return (
{
getImage()
}
)
};
const styles = (props: Props) => StyleSheet.create({
container: {
alignItems: 'center',
borderRadius: 1000,
borderWidth: 5 / PixelRatio.get(),
borderColor: props.backgroundColor ? props.backgroundColor : 'white',
width: props.width ? props.width : width,
height: props.height ? props.height : height
},
button: {
width: props.width ? props.width : width,
height: props.height ? props.height : height,
borderRadius: 1000,
justifyContent: 'center',
backgroundColor: props.backgroundColor ? props.backgroundColor : 'white',
borderColor: props.backgroundColor ? props.backgroundColor : 'white'
},
icon: {
width: props.iconWidth ? props.iconWidth : iconWidth,
height: props.iconHeight ? props.iconHeight : iconHeight,
backgroundColor: 'transparent',
alignSelf: 'center'
},
});
export default Button;