Browse Source

fix(ui): fixed last breadcrumb :before line (#18307)

Priscila Oliveira 4 years ago
parent
commit
e230fd2c0d

+ 1 - 1
src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/breadcrumbs.tsx

@@ -205,7 +205,7 @@ class BreadcrumbsContainer extends React.Component<Props, State> {
                     <BreadCrumb
                     <BreadCrumb
                       data-test-id="breadcrumb"
                       data-test-id="breadcrumb"
                       key={idx}
                       key={idx}
-                      error={
+                      hasError={
                         convertedBreadcrumb.type === 'message' ||
                         convertedBreadcrumb.type === 'message' ||
                         convertedBreadcrumb.type === 'error'
                         convertedBreadcrumb.type === 'error'
                       }
                       }

+ 3 - 3
src/sentry/static/sentry/app/components/events/interfaces/breadcrumbs/styles.tsx

@@ -5,7 +5,7 @@ import {Color} from 'app/utils/theme';
 import space from 'app/styles/space';
 import space from 'app/styles/space';
 
 
 // TODO(style): the color #fffcfb and  #e7c0bc are not yet in theme and no similar theme's color was found.
 // TODO(style): the color #fffcfb and  #e7c0bc are not yet in theme and no similar theme's color was found.
-const BreadCrumb = styled('li')<{error?: boolean}>`
+const BreadCrumb = styled('li')<{hasError?: boolean}>`
   font-size: ${p => p.theme.fontSizeMedium};
   font-size: ${p => p.theme.fontSizeMedium};
   position: relative;
   position: relative;
   padding: ${space(1)} ${space(3)} ${space(0.75)} ${space(3)} !important;
   padding: ${space(1)} ${space(3)} ${space(0.75)} ${space(3)} !important;
@@ -24,10 +24,10 @@ const BreadCrumb = styled('li')<{error?: boolean}>`
   }
   }
   border-bottom: 1px solid ${p => p.theme.borderLight};
   border-bottom: 1px solid ${p => p.theme.borderLight};
   :last-child:before {
   :last-child:before {
-    bottom: 50%;
+    bottom: calc(100% - ${space(1)});
   }
   }
   ${p =>
   ${p =>
-    p.error &&
+    p.hasError &&
     css`
     css`
       background: #fffcfb;
       background: #fffcfb;
       border: 1px solid #e7c0bc;
       border: 1px solid #e7c0bc;