Skip to content

Commit

Permalink
Style/assert option bg (usebruno#2867)
Browse files Browse the repository at this point in the history
* remove old theme configs

* style bg manage from Assertion Comp for AssertionOperator
  • Loading branch information
Pragadesh-45 authored and Its-treason committed Aug 24, 2024
1 parent 36c5bdf commit 7c21a6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import React from 'react';
import { useTheme } from 'providers/Theme/index';
import darkTheme from 'themes/dark';
import lightTheme from 'themes/light';

/**
* Assertion operators
Expand Down Expand Up @@ -81,16 +78,10 @@ const AssertionOperator = ({ operator, onChange }) => {
}
};

const { storedTheme } = useTheme();

return (
<select value={operator} onChange={handleChange} className="mousetrap">
{operators.map((operator) => (
<option
style={{ backgroundColor: storedTheme === 'dark' ? darkTheme.bg : lightTheme.bg }}
key={operator}
value={operator}
>
<option key={operator} value={operator}>
{getLabel(operator)}
</option>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const Wrapper = styled.div`
position: relative;
top: 1px;
}
option {
background-color: ${(props) => props.theme.bg};
}
`;

export default Wrapper;

0 comments on commit 7c21a6a

Please sign in to comment.