let style = {
borderWidth: '1px',
borderStyle: 'solid',
cursor: 'default'
};
let bUsingCursorPointer = true;
if (bUsingCursorPointer) {
style.cursor = "pointer";
}
Full code:
const ItemComponent = (prop) => {
let style = {
borderWidth: '1px',
borderStyle: 'solid',
cursor: 'default'
};
let bUsingCursorPointer = true;
if (bUsingCursorPointer) {
style.cursor = "pointer";
}
return (
name: {prop.name}, price: ${prop.price}, key: {prop.index}
);
};