src/components/buttons/DeleteSquareButton.js
import React from 'react';
import {StyleSheet} from 'react-native';
import BaseSquareButtonLeftIcon from './BaseSquareButtonLeftIcon';
import RedCrossIconSvgr from '../../assets/iconsSvgr/RedCrossIconSvgr';
import {ColorPalette} from '../../utils/ColorConstants';
/**
* Component displaying a square "delete" button.
* @param {Object} props - Properties
* @param {function} props.onPress - Action to be executed when the button is pressed
* @returns {Object} Square "delete" button
*/
export default function DeleteSquareButton(props) {
// Retrieve props
const onPressAction = props.onPress;
const icon = <RedCrossIconSvgr />;
const label = ['SLETT'];
return (
<BaseSquareButtonLeftIcon
onPress={onPressAction}
componentStyle={styles.container}
icon={icon}
label={label}
labelStyle={styles.label}></BaseSquareButtonLeftIcon>
);
}
/**
* Local styles
* @type {Object}
*/
const styles = StyleSheet.create({
container: {
backgroundColor: ColorPalette.PLATINUM,
},
label: {
color: ColorPalette.DARK_RED,
},
});