Skip to content

Commit e127c3e

Browse files
authored
feat(condo): DOMA-11654 update banner component (#6194)
* feat(condo): DOMA-11654 update banner component in UI-Kit * feat(condo): DOMA-11654 fix image position and title rows
1 parent 29c049c commit e127c3e

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

packages/ui/src/components/Banner/banner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const getTitleRows = (width: number, bannerSize: BannerProps['size']) => {
6363
return width < SM_BARRIER ? 2 : 1
6464
}
6565

66-
return 3
66+
return 2
6767
}
6868

6969
const getShowImage = (width: number, bannerSize: BannerProps['size'], imgUrl: BannerProps['imgUrl']) => {
@@ -131,7 +131,7 @@ export const Banner: React.FC<BannerProps> = ({
131131
</Typography.Title>
132132
<Typography.Paragraph
133133
type={invertText ? 'inverted' : 'secondary'}
134-
ellipsis={{ rows: size === 'small' ? 2 : 3 }}
134+
ellipsis={{ rows: 2 }}
135135
size={textSize}
136136
>
137137
{subtitle}

packages/ui/src/components/Banner/style.less

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
flex-direction: column;
2424
align-items: flex-start;
2525
justify-content: space-between;
26-
padding: @condo-global-spacing-60 @condo-global-spacing-32 @condo-global-spacing-60 @condo-global-spacing-60;
26+
padding: @condo-global-spacing-48 @condo-global-spacing-32 @condo-global-spacing-48 @condo-global-spacing-72;
2727
}
2828

2929
&-md > &-content-container,
@@ -87,7 +87,7 @@
8787
}
8888

8989
&:not(.condo-promo-block-no-image) .condo-promo-block-text-container {
90-
max-width: 420px;
90+
max-width: 480px;
9191
}
9292

9393
&-action-link {
@@ -108,7 +108,7 @@
108108
width: 100%;
109109
height: 100%;
110110
object-fit: cover;
111-
object-position: right center;
111+
object-position: center;
112112
user-select: none;
113113
-webkit-user-drag: none;
114114
}

packages/ui/src/tokens/tokens.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,21 @@
3333
"value": "40",
3434
"type": "spacing"
3535
},
36+
"48": {
37+
"value": "48",
38+
"type": "spacing"
39+
},
3640
"52": {
3741
"value": "52",
3842
"type": "spacing"
3943
},
4044
"60": {
4145
"value": "60",
4246
"type": "spacing"
47+
},
48+
"72": {
49+
"value": "72",
50+
"type": "spacing"
4351
}
4452
},
4553
"borderWidth": {

0 commit comments

Comments
 (0)