Skip to content

Commit 3dc5195

Browse files
committed
feat: update the border and padding for menu list footer
1 parent 4580cbe commit 3dc5195

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/Shared/Components/SelectPicker/common.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import { ComponentSizeType } from '@Shared/constants'
4343
import { SelectPickerGroupHeadingProps, SelectPickerOptionType, SelectPickerProps } from './type'
4444
import { getGroupCheckboxValue } from './utils'
4545
import { Icon } from '../Icon'
46-
import { Button, ButtonProps } from '../Button'
46+
import { Button, ButtonProps, ButtonVariantType } from '../Button'
4747

4848
const getTooltipProps = (tooltipProps: SelectPickerOptionType['tooltipProps'] = {}): TooltipProps => {
4949
if (tooltipProps) {
@@ -258,7 +258,7 @@ const SelectPickerMenuListFooter = ({
258258
const { value } = menuListFooterConfig
259259

260260
return (
261-
<div className="flex left dc__gap-6">
261+
<div className="flex left dc__gap-6 p-8">
262262
<Icon name="ic-info-outline" color="N700" size={16} />
263263
<p className="fs-12 fw-4 fs-16 cn-8 dc__truncate">{value}</p>
264264
</div>
@@ -267,11 +267,14 @@ const SelectPickerMenuListFooter = ({
267267

268268
if (type === 'button') {
269269
const { buttonProps } = menuListFooterConfig
270+
const { variant } = buttonProps
270271

271272
return (
272-
// We are adding justify-content: flex-start for secondary variant
273-
<div className={`select-picker__menu-list-footer-button--${buttonProps.variant}`}>
274-
<Button {...(buttonProps as ButtonProps)} size={ComponentSizeType.small} fullWidth />
273+
// We are adding justify-content: flex-start for borderLess variant using this class
274+
<div
275+
className={`select-picker__menu-list-footer-button--${variant} ${variant === ButtonVariantType.borderLess ? 'py-4' : 'p-8'}`}
276+
>
277+
<Button {...(buttonProps as ButtonProps)} size={ComponentSizeType.medium} fullWidth />
275278
</div>
276279
)
277280
}
@@ -308,7 +311,7 @@ export const SelectPickerMenuList = <OptionValue,>(props: MenuListProps<SelectPi
308311
{/* Added to the bottom of menu list to prevent from hiding when the menu is opened close to the bottom of the screen */}
309312
</components.MenuList>
310313
{!shouldRenderCustomOptions && menuListFooterConfig && (
311-
<div className="dc__position-sticky dc__bottom-0 dc__bottom-radius-4 bg__menu--primary dc__zi-2 p-8 dc__border-top-n1">
314+
<div className="dc__position-sticky dc__bottom-0 dc__bottom-radius-4 bg__menu--primary dc__zi-2 border__primary-translucent--top">
312315
<SelectPickerMenuListFooter menuListFooterConfig={menuListFooterConfig} />
313316
</div>
314317
)}

src/Shared/Components/SelectPicker/selectPicker.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
&--border-less {
44
button, a {
55
justify-content: flex-start;
6+
border-radius: 0;
67
}
78
}
89
}

0 commit comments

Comments
 (0)