@@ -6,6 +6,7 @@ import {Alert} from 'sentry/components/core/alert';
6
6
import { Tag } from 'sentry/components/core/badge/tag' ;
7
7
import { Button } from 'sentry/components/core/button' ;
8
8
import { Flex } from 'sentry/components/core/layout' ;
9
+ import { Heading , Text } from 'sentry/components/core/text' ;
9
10
import Panel from 'sentry/components/panels/panel' ;
10
11
import Placeholder from 'sentry/components/placeholder' ;
11
12
import { IconChevron , IconLightning , IconLock } from 'sentry/icons' ;
@@ -133,11 +134,11 @@ function ItemsSummary({activePlan, formData}: ItemsSummaryProps) {
133
134
< IconContainer > { getPlanIcon ( activePlan ) } </ IconContainer >
134
135
< Flex direction = "column" gap = "xs" >
135
136
< ItemFlex >
136
- < strong > { tct ( '[name] Plan' , { name : activePlan . name } ) } </ strong >
137
- < div >
137
+ < Text bold > { tct ( '[name] Plan' , { name : activePlan . name } ) } </ Text >
138
+ < Text >
138
139
{ utils . displayPrice ( { cents : activePlan . totalPrice } ) }
139
140
{ `/${ shortInterval } ` }
140
- </ div >
141
+ </ Text >
141
142
</ ItemFlex >
142
143
{ activePlan . categories
143
144
. filter (
@@ -166,7 +167,7 @@ function ItemsSummary({activePlan, formData}: ItemsSummaryProps) {
166
167
return (
167
168
< ItemFlex key = { category } >
168
169
< div >
169
- { isPaygOnly ? '' : `${ formattedReserved } ` }
170
+ < Text > { isPaygOnly ? '' : `${ formattedReserved } ` } </ Text >
170
171
{ reserved === 1 && category !== DataCategory . ATTACHMENTS
171
172
? getSingularCategoryName ( {
172
173
plan : activePlan ,
@@ -682,29 +683,34 @@ function Cart({
682
683
onToggle = { setChangesIsOpen }
683
684
organization = { organization }
684
685
/>
685
- < PlanSummaryHeader isOpen = { summaryIsOpen } shouldShadow = { changesIsOpen } >
686
- < Title > { t ( 'Plan Summary' ) } </ Title >
687
- < Flex gap = "xs" align = "center" >
688
- < OrgSlug > { organization . slug . toUpperCase ( ) } </ OrgSlug >
689
- < Button
690
- aria-label = { `${ summaryIsOpen ? 'Hide' : 'Show' } plan summary` }
691
- onClick = { ( ) => setSummaryIsOpen ( ! summaryIsOpen ) }
692
- borderless
693
- icon = { < IconChevron direction = { summaryIsOpen ? 'up' : 'down' } /> }
694
- />
695
- </ Flex >
696
- </ PlanSummaryHeader >
697
- { summaryIsOpen && (
698
- < div data-test-id = "plan-summary" >
699
- < ItemsSummary activePlan = { activePlan } formData = { formData } />
700
- < SubtotalSummary
701
- activePlan = { activePlan }
702
- formData = { formData }
703
- previewDataLoading = { previewState . isLoading }
704
- renewalDate = { previewState . renewalDate }
705
- />
706
- </ div >
707
- ) }
686
+ < PlanSummary >
687
+ < PlanSummaryHeader isOpen = { summaryIsOpen } >
688
+ < Heading as = "h2" textWrap = "nowrap" >
689
+ { t ( 'Plan Summary' ) }
690
+ </ Heading >
691
+ < Flex gap = "xs" align = "center" >
692
+ < OrgSlug > { organization . slug . toUpperCase ( ) } </ OrgSlug >
693
+ < Button
694
+ aria-label = { summaryIsOpen ? t ( 'Hide plan summary' ) : t ( 'Show plan summary' ) }
695
+ onClick = { ( ) => setSummaryIsOpen ( ! summaryIsOpen ) }
696
+ borderless
697
+ size = "xs"
698
+ icon = { < IconChevron direction = { summaryIsOpen ? 'up' : 'down' } /> }
699
+ />
700
+ </ Flex >
701
+ </ PlanSummaryHeader >
702
+ { summaryIsOpen && (
703
+ < PlanSummaryContents data-test-id = "plan-summary" >
704
+ < ItemsSummary activePlan = { activePlan } formData = { formData } />
705
+ < SubtotalSummary
706
+ activePlan = { activePlan }
707
+ formData = { formData }
708
+ previewDataLoading = { previewState . isLoading }
709
+ renewalDate = { previewState . renewalDate }
710
+ />
711
+ </ PlanSummaryContents >
712
+ ) }
713
+ </ PlanSummary >
708
714
< TotalSummary
709
715
activePlan = { activePlan }
710
716
billedTotal = { previewState . billedTotal }
@@ -729,39 +735,48 @@ export default Cart;
729
735
const CartContainer = styled ( Panel ) `
730
736
display: flex;
731
737
flex-direction: column;
738
+ border-bottom: ${ p => ( p . theme . isChonk ? '3px' : '1px' ) } solid ${ p => p . theme . border } ;
739
+ padding-bottom: ${ p => p . theme . space . xl } ;
740
+
741
+ > *:first-child {
742
+ border-bottom: 1px solid ${ p => p . theme . border } ;
743
+ }
732
744
` ;
733
745
734
746
const SummarySection = styled ( 'div' ) `
735
747
display: flex;
736
748
flex-direction: column;
737
- padding: 0 ${ p => p . theme . space . xl } ${ p => p . theme . space [ '2xl' ] } ;
749
+ padding: 0 ${ p => p . theme . space . xl } ;
738
750
739
751
& > *:not(:last-child) {
740
752
margin-bottom: ${ p => p . theme . space . xl } ;
741
753
}
742
754
743
- border-bottom: 1px solid ${ p => p . theme . border } ;
744
-
745
755
&:not(:first-child) {
746
756
padding-top: ${ p => p . theme . space [ '2xl' ] } ;
747
757
}
748
758
` ;
749
759
750
- const Title = styled ( 'h1' ) `
751
- font-size: ${ p => p . theme . fontSize . xl } ;
752
- font-weight: ${ p => p . theme . fontWeight . bold } ;
753
- margin: 0;
754
- text-wrap: nowrap;
760
+ const PlanSummary = styled ( 'div' ) `
761
+ &:not(:first-child) {
762
+ border-top: 1px solid ${ p => p . theme . border } ;
763
+ }
755
764
` ;
756
765
757
- const PlanSummaryHeader = styled ( 'div' ) < { isOpen : boolean ; shouldShadow : boolean } > `
766
+ const PlanSummaryHeader = styled ( 'div' ) < { isOpen : boolean } > `
758
767
display: flex;
759
768
justify-content: space-between;
760
769
align-items: center;
761
- padding: ${ p => p . theme . space . xl } ;
762
- border-bottom: ${ p => ( p . isOpen ? 'none' : `1px solid ${ p . theme . border } ` ) } ;
763
- box-shadow: ${ p => ( p . shouldShadow ? '0 -5px 5px #00000010' : 'none' ) } ;
764
770
gap: ${ p => p . theme . space . sm } ;
771
+ padding: ${ p => p . theme . space . lg } ${ p => p . theme . space . xl } ;
772
+ ` ;
773
+
774
+ const PlanSummaryContents = styled ( 'div' ) `
775
+ > *:last-child {
776
+ margin-top: ${ p => p . theme . space . lg } ;
777
+ padding: ${ p => p . theme . space . xl } ${ p => p . theme . space . xl } ;
778
+ border-top: 1px solid ${ p => p . theme . border } ;
779
+ }
765
780
` ;
766
781
767
782
const OrgSlug = styled ( 'div' ) `
@@ -788,11 +803,21 @@ const ItemFlex = styled('div')`
788
803
justify-content: space-between;
789
804
align-items: center;
790
805
gap: ${ p => p . theme . space [ '3xl' ] } ;
806
+ line-height: 100%;
807
+
808
+ > * {
809
+ margin-bottom: ${ p => p . theme . space . xs } ;
810
+ }
811
+
812
+ &:not(:first-child) {
813
+ color: ${ p => p . theme . subText } ;
814
+ }
791
815
` ;
792
816
793
817
const IconContainer = styled ( 'div' ) `
794
818
display: flex;
795
819
align-items: center;
820
+ margin-top: 1px;
796
821
` ;
797
822
798
823
const RenewalDate = styled ( 'div' ) `
@@ -806,12 +831,12 @@ const DueToday = styled('div')`
806
831
` ;
807
832
808
833
const DueTodayPrice = styled ( 'div' ) `
809
- font-size: ${ p => p . theme . fontSize . lg } ;
834
+ font-size: ${ p => p . theme . fontSize . md } ;
810
835
` ;
811
836
812
837
const DueTodayAmount = styled ( 'span' ) `
813
838
font-weight: ${ p => p . theme . fontWeight . bold } ;
814
- font-size: ${ p => p . theme . fontSize . xl } ;
839
+ font-size: ${ p => p . theme . fontSize [ '2xl' ] } ;
815
840
` ;
816
841
817
842
const DueTodayAmountBeforeDiscount = styled ( DueTodayAmount ) `
@@ -837,7 +862,6 @@ const ButtonContainer = styled('div')`
837
862
` ;
838
863
839
864
const Subtext = styled ( 'div' ) `
840
- margin-top: ${ p => p . theme . space [ '2xl' ] } ;
841
865
font-size: ${ p => p . theme . fontSize . sm } ;
842
866
color: ${ p => p . theme . subText } ;
843
867
text-align: center;
0 commit comments