diff --git a/app/src/@shared/ui-kit/Tooltip/IconTooltip.tsx b/app/src/@shared/ui-kit/Tooltip/IconTooltip.tsx index 2d78f90e..95713ed6 100644 --- a/app/src/@shared/ui-kit/Tooltip/IconTooltip.tsx +++ b/app/src/@shared/ui-kit/Tooltip/IconTooltip.tsx @@ -25,9 +25,26 @@ export const IconTooltip = ({ text, }); - const Icon = type === 'info' ? MdInfo : MdWarning; - const iconColor = - type === 'info' ? theme.colors.mono.gray500 : theme.colors.semantic.warning; + const Icon = (() => { + switch (type) { + case 'info': + return MdInfo; + case 'warning': + return MdWarning; + default: + return MdInfo; + } + })(); + const iconColor = (() => { + switch (type) { + case 'info': + return theme.colors.mono.gray500; + case 'warning': + return theme.colors.semantic.warning; + default: + return theme.colors.mono.gray500; + } + })(); return ( diff --git a/app/src/@shared/ui-kit/Tooltip/Tooltip.tsx b/app/src/@shared/ui-kit/Tooltip/Tooltip.tsx index 959204a6..6faad0eb 100644 --- a/app/src/@shared/ui-kit/Tooltip/Tooltip.tsx +++ b/app/src/@shared/ui-kit/Tooltip/Tooltip.tsx @@ -21,7 +21,7 @@ export const Tooltip = () => { return ( - +