I have created a button component in react. Functionality is working but I'm unable to change the button colors and style
parent.js
import React, { Component } from "react";
import {Button, TYPES} from '../../../Global/button';
class ProductDisplay extends Component{
render(){
return(
<Button buttonType={TYPES.DANGER} label="Add To Cart" onClick={() =>
this.addItemToCart(pdpList.uniqueID)}></Button>
)
}
}
export default ProductDisplay;
button.js
import React from 'react';
import classnames from 'classnames';
export const TYPES = {
PRIMARY: 'btn-primary',
WARNING: 'btn-warning',
DANGER: 'btn-danger',
SUCCESS: 'btn-success',
}
export const Button = (props) => (
<button buttonType={props.TYPES} onClick={props.onClick} classnames={
[props.buttonType || TYPES.PRIMARY]
}>
{props.label}
</button>
);
I'm not able to change the color. Can anybody help me