Skip to content

Commit 3f82b55

Browse files
blushir41ph
authored andcommitted
fix: APP-533 credit class type and methodology layout (#2589)
1 parent 52e93e2 commit 3f82b55

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

web-components/src/components/atoms/CardRibbon/CardRibbon.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface Props {
1414
labelMobileSize?: LabelSize;
1515
sx?: SxProps<Theme>;
1616
sxIcon?: SxProps<Theme>;
17+
className?: string;
1718
}
1819
const CardRibbon = ({
1920
icon,
@@ -22,9 +23,11 @@ const CardRibbon = ({
2223
labelMobileSize = 'xs',
2324
sx = [],
2425
sxIcon = [],
26+
className,
2527
}: Props): JSX.Element => {
2628
return (
2729
<Flex
30+
className={className}
2831
sx={[
2932
{
3033
background:

web-components/src/components/cards/CreditClassCard/CreditClassCard.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const CreditClassCard = ({
6565
>
6666
{type && (
6767
<CardRibbon
68+
className="max-w-[80%] sm:max-w-[200px]"
6869
icon={type.icon}
6970
label={type.name}
7071
labelSize="xs"
@@ -127,7 +128,11 @@ const CreditClassCard = ({
127128
<CreditClassCardItem
128129
label={offsetGenerationMethodLabel}
129130
items={generationMethods}
130-
sx={{ maxWidth: { sm: 195 }, mr: 5, mb: { xs: 5, sm: 0 } }}
131+
sx={{
132+
maxWidth: { sm: methodology ? 195 : undefined },
133+
mr: 5,
134+
mb: { xs: 5, sm: 0 },
135+
}}
131136
sxListContainer={{
132137
flexDirection: 'column',
133138
alignItems: 'flex-start',
@@ -139,7 +144,7 @@ const CreditClassCard = ({
139144
<CreditClassCardItem
140145
label={methodologyLabel}
141146
link={methodology}
142-
sx={{ maxWidth: { sm: 195 } }}
147+
sx={{ maxWidth: { sm: generationMethods ? 195 : undefined } }}
143148
/>
144149
)}
145150
</Flex>

web-components/src/theme/muiTheme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const defaultTheme = createTheme({
55
breakpoints: {
66
values: {
77
xs: 0,
8-
sm: 600,
8+
sm: 640,
99
tablet: 834,
1010
md: 1024,
1111
lg: 1280,

0 commit comments

Comments
 (0)