Basic project structure.

This commit is contained in:
Tomasz Rewak
2023-05-11 22:06:03 +02:00
parent cdb87b97b6
commit 7ae840d3ab
5 changed files with 70 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import React from 'react';
function useColor(status) {
if (status === 'yes')
return '#52e691';
if (status === 'no')
return '#a41413';
if (status === 'info')
return '#3caee0';
throw new Error(`Invalid status: ${status}`);
}
export default function WiseMan(props) {
const { setProps, name, order_number, status } = props;
const fullName = `${name}${order_number}`;
const color = useColor(status);
return React.createElement('div', { className: 'wise-man', style: { background: color } }, [
fullName
])
}