import { Button, Grid } from "@mui/material";

const CallActionSubcategoriesButton = ({ sub_category, tab, handleSubcategoryButton }) => {
    
    return sub_category.category_id === tab.active_category_id ? (
        <Grid item xs={3}>
            <Button sx={{py : 1.5}} fullWidth color="inherit" 
            onClick={()=>{handleSubcategoryButton(sub_category.category_id, sub_category.subcategory_id)}} variant={"contained"}>
                {sub_category.subcategory_name}
            </Button>
        </Grid>
    ) : null;
};
export default CallActionSubcategoriesButton;
