Skip to content
Snippets Groups Projects
Unverified Commit bfe4f082 authored by GyDi's avatar GyDi
Browse files

fix: adjust rule ui

parent 132f914b
No related branches found
No related tags found
No related merge requests found
...@@ -9,11 +9,9 @@ const Item = styled(Box)(({ theme }) => ({ ...@@ -9,11 +9,9 @@ const Item = styled(Box)(({ theme }) => ({
const COLOR = [ const COLOR = [
"primary", "primary",
"secondary", "secondary",
"info", "info.main",
"warning", "warning.main",
"error", "success.main",
"success",
"text",
]; ];
interface Props { interface Props {
...@@ -22,6 +20,9 @@ interface Props { ...@@ -22,6 +20,9 @@ interface Props {
} }
const parseColor = (text: string) => { const parseColor = (text: string) => {
if (text === "REJECT") return "error.main";
if (text === "DIRECT") return "text.primary";
let sum = 0; let sum = 0;
for (let i = 0; i < text.length; i++) { for (let i = 0; i < text.length; i++) {
sum += text.charCodeAt(i); sum += text.charCodeAt(i);
...@@ -42,7 +43,7 @@ const RuleItem = (props: Props) => { ...@@ -42,7 +43,7 @@ const RuleItem = (props: Props) => {
{index} {index}
</Typography> </Typography>
<Box> <Box sx={{ userSelect: "text" }}>
<Typography component="h6" variant="subtitle1" color="text.primary"> <Typography component="h6" variant="subtitle1" color="text.primary">
{value.payload || "-"} {value.payload || "-"}
</Typography> </Typography>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment