Browse Source

fix(team_alerts): Remove Unassigned from Team Alerts Dropdown (#25213)

* fix(team_alerts): Remove Unassigned from Team Alerts Dropdown and fix Alerts view

Remove Unassigned from Team Alerts Dropdown and fix Alerts view for users that are not part of any teams.

FIXES WOR-762

* changing this back, there's already an alert banner if a user doesn't have access

* add includeUnassigned back and make icon white when selected

* update svg color

* actually fix the color
Kelly Carino 3 years ago
parent
commit
11a01bce6e
1 changed files with 11 additions and 2 deletions
  1. 11 2
      static/app/components/selectMembers/index.tsx

+ 11 - 2
static/app/components/selectMembers/index.tsx

@@ -42,13 +42,14 @@ const UnassignedWrapper = styled('div')`
 const StyledIconUser = styled(IconUser)`
   margin-left: ${space(0.25)};
   margin-right: ${space(1)};
+  color: ${p => p.theme.gray400};
 `;
 
 const unassignedOption = {
   value: null,
   label: (
     <UnassignedWrapper>
-      <StyledIconUser size="20px" color="gray400" />
+      <StyledIconUser size="20px" />
       {t('Unassigned')}
     </UnassignedWrapper>
   ),
@@ -388,7 +389,15 @@ class SelectMembers extends React.Component<Props, State> {
         onInputChange={this.handleInputChange}
         onChange={this.handleChange}
         value={this.state.options?.find(({value}) => value === this.props.value)}
-        styles={styles}
+        styles={{
+          styles,
+          option: (provided, state: any) => ({
+            ...provided,
+            svg: {
+              color: state.isSelected && state.theme.white,
+            },
+          }),
+        }}
       />
     );
   }