Skip to content

Commit

Permalink
use StyledWrapper
Browse files Browse the repository at this point in the history
Signed-off-by: mathieu <mathieu.dreano@gmail.com>
  • Loading branch information
MathieuDreano committed Nov 28, 2023
1 parent 0bf21d1 commit 0f443d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from 'styled-components';

const Wrapper = styled.div`
.current-environment {
background-color: ${(props) => props.theme.sidebar.badge.bg};
background-color: ${(props) => props.color ?? props.theme.sidebar.badge.bg};
border-radius: 15px;
.caret {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ const EnvironmentSelector = (props) => {

const Icon = forwardRef((props, ref) => {
return (
<div
ref={ref}
style={{ background: activeEnvironment?.color }}
className="current-environment flex items-center justify-center pl-3 pr-2 py-1 select-none"
>
<div ref={ref} className="current-environment flex items-center justify-center pl-3 pr-2 py-1 select-none">
{activeEnvironment ? activeEnvironment.name : 'No Environment'}
<IconCaretDown className="caret" size={14} strokeWidth={2} />
</div>
Expand All @@ -50,7 +46,7 @@ const EnvironmentSelector = (props) => {
};

return (
<StyledWrapper>
<StyledWrapper color={activeEnvironment?.color}>
<div className="flex items-center cursor-pointer environment-selector">
<Dropdown onCreate={onDropdownCreate} icon={<Icon />} placement="bottom-end">
{collection.environments?.length
Expand Down

0 comments on commit 0f443d6

Please sign in to comment.