Skip to content

Commit 52d236c

Browse files
committed
feat: add neutral variant to InfoBlock component with corresponding background and icon mappings
1 parent 0a439ad commit 52d236c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Shared/Components/InfoBlock/constants.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const VARIANT_TO_BG_MAP: Record<InfoBlockProps['variant'], string> = {
2929
information: 'bcb-1 eb-2',
3030
success: 'bcg-1 eg-2',
3131
warning: 'bcy-1 ey-2',
32+
neutral: 'bcn-1 en-2',
3233
}
3334

3435
export const VARIANT_TO_ICON_MAP: Record<InfoBlockProps['variant'], InfoBlockProps['customIcon']> = {
@@ -37,6 +38,7 @@ export const VARIANT_TO_ICON_MAP: Record<InfoBlockProps['variant'], InfoBlockPro
3738
information: <ICInfoFilled />,
3839
success: <ICSuccess />,
3940
warning: <ICWarningY5 />,
41+
neutral: <ICInfoFilled className="circle-fill--n7" />,
4042
}
4143

4244
export const CONTAINER_SIZE_TO_CLASS_MAP: Record<InfoBlockProps['size'], string> = {

src/Shared/Components/InfoBlock/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export type InfoBlockProps = {
2727
/**
2828
* @default 'information'
2929
*/
30-
variant?: 'error' | 'help' | 'information' | 'success' | 'warning'
30+
variant?: 'error' | 'help' | 'information' | 'success' | 'warning' | 'neutral'
3131
/**
3232
* @default ComponentSizeType.large
3333
*/

0 commit comments

Comments
 (0)