Skip to content

Commit 6e1c1ad

Browse files
committed
align text and icon
1 parent 5f50ffd commit 6e1c1ad

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

redisinsight/ui/src/components/base/icons/Icon.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ type BaseIconProps = Omit<MonochromeIconProps, 'color' | 'size'> & {
1212
| (string & {})
1313
size?: IconSizeType | null
1414
isSvg?: boolean
15+
style?: React.CSSProperties
1516
}
1617

1718
const sizesMap = {
@@ -43,6 +44,7 @@ export const Icon = ({
4344
color = 'primary600',
4445
size,
4546
className,
47+
style = {},
4648
...rest
4749
}: BaseIconProps) => {
4850
let sizeValue: number | string | undefined
@@ -73,7 +75,13 @@ export const Icon = ({
7375
? svgProps
7476
: { color, customColor, size, customSize, ...rest }
7577

76-
return <IconComponent {...props} className={cx(className, 'RI-Icon')} />
78+
return (
79+
<IconComponent
80+
{...props}
81+
style={{ ...style, verticalAlign: 'middle' }}
82+
className={cx(className, 'RI-Icon')}
83+
/>
84+
)
7785
}
7886

7987
export type IconProps = Omit<BaseIconProps, 'icon'>

redisinsight/ui/src/pages/rdi/instance/components/header/components/buttons/deploy-pipeline-button/DeployPipelineButton.tsx

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
1414
import { createAxiosError, pipelineToJson } from 'uiSrc/utils'
1515
import { addErrorNotification } from 'uiSrc/slices/app/notifications'
1616
import { rdiErrorMessages } from 'uiSrc/pages/rdi/constants'
17-
import { Text } from 'uiSrc/components/base/text'
17+
import { ColorText, Text } from 'uiSrc/components/base/text'
1818
import { FlexItem, Row } from 'uiSrc/components/base/layout/flex'
1919
import { Spacer } from 'uiSrc/components/base/layout/spacer'
2020
import { OutsideClickDetector } from 'uiSrc/components/base/utils'
@@ -128,14 +128,19 @@ const DeployPipelineButton = ({ loading, disabled, onReset }: Props) => {
128128
</PrimaryButton>
129129
}
130130
>
131-
{isPipelineValid ? (
132-
<Title size="XS">Are you sure you want to deploy the pipeline?</Title>
133-
) : (
134-
<Text color="danger" size="M">
135-
<RiIcon type="InfoIcon" size="M" color="danger500" />
136-
Your RDI pipeline contains errors. Are you sure you want to continue?
137-
</Text>
138-
)}
131+
<Title size="XS">
132+
{isPipelineValid ? (
133+
<ColorText color="default">
134+
Are you sure you want to deploy the pipeline?
135+
</ColorText>
136+
) : (
137+
<ColorText color="warning">
138+
<RiIcon type="ToastDangerIcon" size="L" color="attention500" />
139+
Your RDI pipeline contains errors. Are you sure you want to
140+
continue?
141+
</ColorText>
142+
)}
143+
</Title>
139144
<Spacer size="s" />
140145
<Text size="s">
141146
When deployed, this local configuration will overwrite any existing

0 commit comments

Comments
 (0)