assert operator dropdown bgcolor fix

This commit is contained in:
therealrinku 2023-10-13 21:05:13 +05:45
parent 6b668aaebe
commit b11113b529

View File

@ -1,4 +1,7 @@
import React from 'react';
import { useTheme } from 'providers/Theme/index';
import darkTheme from 'themes/dark';
import lightTheme from 'themes/light';
/**
* Assertion operators
@ -76,10 +79,16 @@ const AssertionOperator = ({ operator, onChange }) => {
}
};
const { storedTheme } = useTheme();
return (
<select value={operator} onChange={handleChange} className="mousetrap">
{operators.map((operator) => (
<option key={operator} value={operator}>
<option
style={{ backgroundColor: storedTheme === 'dark' ? darkTheme.bg : lightTheme.bg }}
key={operator}
value={operator}
>
{getLabel(operator)}
</option>
))}