Hi, I would like to know how I can change the background color in Chip from Material-UI , depends the user , for example: I have a module to comments , and I need to separate by color if the user is Admin or Normal User
<Chip
label={comment['user.firstname']}
style={styles.chip}
/>
try {
const data = {
orderId: this.state.order.id,
description
};
const comment = await createComment(data);
if (comment.data.success) {
const comments = this.state.comments;
comment.data.data['user.firstname'] = 'You';
comments.push(comment.data.data);
this.setState({ comments });
}
} catch (err) {
if (err.response) {
this.props.showSnack({
variant: 'error',
message: 'Error saving data!'
});
} else {
// Something happened in setting up the request that triggered an Error
this.props.showSnack({
variant: 'error',
message: err.message
});
}
}
No responses yet.