Skip to content

Commit 35b5e08

Browse files
committed
feat: Update InfoBlock component to support fullWidth prop and change default size to large
1 parent 5dfb1ec commit 35b5e08

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/Shared/Components/InfoBlock/InfoBlock.component.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ import { Button } from '../Button'
88
const InfoBlock = ({
99
layout = 'row',
1010
variant = 'information',
11-
size = ComponentSizeType.medium,
11+
size = ComponentSizeType.large,
1212
customIcon,
1313
buttonProps,
1414
heading,
1515
description,
1616
borderRadiusConfig,
1717
borderConfig,
18+
fullWidth = true,
1819
}: InfoBlockProps) => {
19-
const baseContainerClass = `${size === ComponentSizeType.large ? 'px-12' : 'px-8'} ${VARIANT_TO_BG_MAP[variant]} ${deriveBorderRadiusClassFromConfig(borderRadiusConfig)} ${deriveBorderClassFromConfig(borderConfig)} py-8 br-4 bw-1`
20+
const baseContainerClass = `${size === ComponentSizeType.large ? 'px-12' : 'px-8'} ${VARIANT_TO_BG_MAP[variant]} ${deriveBorderRadiusClassFromConfig(borderRadiusConfig)} ${deriveBorderClassFromConfig(borderConfig)} ${fullWidth ? 'w-100' : ''} py-8 br-4 bw-1`
2021
const Icon = customIcon ?? VARIANT_TO_ICON_MAP[variant]
2122

2223
const renderIcon = () =>

src/Shared/Components/InfoBlock/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export type InfoBlockProps = {
2323
buttonProps?: ButtonProps
2424
borderConfig?: BorderConfigType
2525
borderRadiusConfig?: BorderConfigType
26+
/**
27+
* @default true
28+
*/
29+
fullWidth?: boolean
2630
} & (
2731
| {
2832
/**

0 commit comments

Comments
 (0)