Просмотр исходного кода

fixed invalid email text on invite screen

jusrhee 5 лет назад
Родитель
Сommit
96ecd8cdfc

+ 4 - 3
dashboard/src/components/TabRegion.tsx

@@ -11,6 +11,7 @@ type PropsType = {
   defaultTab?: string,
   addendum?: any,
   color?: string | null,
+  overflowY?: string,
 };
 
 type StateType = {
@@ -63,7 +64,7 @@ export default class TabRegion extends Component<PropsType, StateType> {
 
   render() {
     return (
-      <StyledTabRegion>
+      <StyledTabRegion overflowY={this.props.overflowY}>
         {this.renderContents()}
       </StyledTabRegion>
     );
@@ -98,9 +99,9 @@ const Gap = styled.div`
   height: 30px;
 `;
 
-const StyledTabRegion = styled.div`
+const StyledTabRegion = styled.div<{ overflowY: string }>`
   width: 100%;
   height: 100%;
   position: relative;
-  overflow-y: auto;
+  overflow-y: ${props => props.overflowY};
 `;

+ 7 - 8
dashboard/src/main/home/project-settings/InviteList.tsx

@@ -245,12 +245,12 @@ export default class InviteList extends Component<PropsType, StateType> {
           >
             Create Invite
           </InviteButton>
+          {this.state.invalidEmail &&
+            <Invalid>
+              Invalid email address. Please try again.
+            </Invalid>
+          }
         </ButtonWrapper>
-        {this.state.invalidEmail &&
-          <Invalid>
-            Invalid Email Address. Try Again.
-          </Invalid>
-        }
         {this.renderInvitations()}
       </>
     )
@@ -428,9 +428,8 @@ const LinkTd = styled(Td)`
 `;
 
 const Invalid = styled.div`
-  margin-top: -26px;
-  margin-bottom: 26px;
-  color: #fa0a26;
+  color: #f5cb42;
+  margin-left: 15px;
   font-size: 13px;
   font-family: 'Work Sans', sans-serif;
 `;

+ 1 - 0
dashboard/src/main/home/project-settings/ProjectSettings.tsx

@@ -63,6 +63,7 @@ export default class ProjectSettings extends Component<PropsType, StateType> {
           <Title>Project Settings</Title>
         </TitleSection>
         <TabRegion
+          overflowY='visible'
           currentTab={this.state.currentTab}
           setCurrentTab={(x: string) => this.setState({ currentTab: x })}
           options={tabOptions}