Skip to content

Commit 4a31769

Browse files
committed
chore: icon imported
1 parent a3cc114 commit 4a31769

File tree

5 files changed

+14
-12
lines changed

5 files changed

+14
-12
lines changed

src/Assets/IconV2/ic-help-filled.svg

Lines changed: 4 additions & 0 deletions
Loading

src/Common/EmptyState/emptyState.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
max-height: 200px;
2828
width: auto;
2929
}
30-
.button, .override-generic-empty svg {
30+
.button, .override-empty-svg-dim svg {
3131
height: 100%;
3232
max-height: none;
3333
width: 100%;

src/Shared/Components/Icon/Icon.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ import { ReactComponent as ICHeartGreen } from '@IconsV2/ic-heart-green.svg'
5959
import { ReactComponent as ICHeartRed } from '@IconsV2/ic-heart-red.svg'
6060
import { ReactComponent as ICHeartRedAnimated } from '@IconsV2/ic-heart-red-animated.svg'
6161
import { ReactComponent as ICHelm } from '@IconsV2/ic-helm.svg'
62+
import { ReactComponent as ICHelpFilled } from '@IconsV2/ic-help-filled.svg'
6263
import { ReactComponent as ICHelpOutline } from '@IconsV2/ic-help-outline.svg'
6364
import { ReactComponent as ICHibernate } from '@IconsV2/ic-hibernate.svg'
6465
import { ReactComponent as ICInProgress } from '@IconsV2/ic-in-progress.svg'
@@ -172,6 +173,7 @@ export const iconMap = {
172173
'ic-heart-red-animated': ICHeartRedAnimated,
173174
'ic-heart-red': ICHeartRed,
174175
'ic-helm': ICHelm,
176+
'ic-help-filled': ICHelpFilled,
175177
'ic-help-outline': ICHelpOutline,
176178
'ic-hibernate': ICHibernate,
177179
'ic-in-progress': ICInProgress,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const InfoBlock = ({
3838
borderRadiusConfig,
3939
borderConfig,
4040
}: InfoBlockProps) => {
41-
const baseContainerClass = `${CONTAINER_SIZE_TO_CLASS_MAP[size]} ${VARIANT_TO_BG_MAP[variant]} ${deriveBorderRadiusAndBorderClassFromConfig({ borderConfig, borderRadiusConfig })} w-100 py-8 br-4 bw-1`
41+
const baseContainerClass = `override-empty-svg-dim ${CONTAINER_SIZE_TO_CLASS_MAP[size]} ${VARIANT_TO_BG_MAP[variant]} ${deriveBorderRadiusAndBorderClassFromConfig({ borderConfig, borderRadiusConfig })} w-100 py-8 br-4 bw-1`
4242
const iconClass = `dc__no-shrink flex dc__fill-available-space ${SIZE_TO_ICON_CLASS_MAP[size]}`
4343
const icon = customIcon ?? VARIANT_TO_ICON_MAP[variant]
4444

@@ -94,7 +94,7 @@ const InfoBlock = ({
9494

9595
if (layout === 'row') {
9696
return (
97-
<div className={`${baseContainerClass} override-generic-empty flexbox dc__gap-16`}>
97+
<div className={`${baseContainerClass} flexbox dc__gap-16`}>
9898
<div className="flexbox dc__gap-8 flex-grow-1">
9999
{renderIcon()}
100100
{renderContent()}
@@ -107,7 +107,7 @@ const InfoBlock = ({
107107

108108
if (layout === 'column') {
109109
return (
110-
<div className={`${baseContainerClass} override-generic-empty flexbox-col dc__gap-8`}>
110+
<div className={`${baseContainerClass} flexbox-col dc__gap-8`}>
111111
<div className="flexbox dc__gap-8">
112112
{renderContent()}
113113
{renderIcon()}

src/Shared/Components/InfoBlock/constants.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { ReactComponent as ICError } from '@Icons/ic-error.svg'
18-
import { ReactComponent as ICHelp } from '@Icons/ic-help.svg'
19-
import { ReactComponent as ICSuccess } from '@Icons/ic-success.svg'
20-
import { ReactComponent as ICWarningY5 } from '@Icons/ic-warning-y5.svg'
2117
import { ComponentSizeType } from '@Shared/constants'
2218

2319
import { ButtonProps } from '../Button'
@@ -34,11 +30,11 @@ export const VARIANT_TO_BG_MAP: Record<InfoBlockProps['variant'], string> = {
3430
}
3531

3632
export const VARIANT_TO_ICON_MAP: Record<InfoBlockProps['variant'], InfoBlockProps['customIcon']> = {
37-
error: <ICError />,
38-
help: <ICHelp className="fcv-5" />,
33+
error: <Icon name="ic-error" color="R500" />,
34+
help: <Icon name="ic-help-outline" color="V500" />,
3935
information: <Icon name="ic-info-filled" color="B500" />,
40-
success: <ICSuccess />,
41-
warning: <ICWarningY5 />,
36+
success: <Icon name="ic-success" color="G500" />,
37+
warning: <Icon name="ic-warning" color="Y500" />,
4238
neutral: <Icon name="ic-info-filled" color={null} />,
4339
}
4440

0 commit comments

Comments
 (0)