Skip to content

Commit

Permalink
front: fix pr comments
Browse files Browse the repository at this point in the history
Signed-off-by: Egor Berezovskiy <[email protected]>
  • Loading branch information
Wadjetz committed Dec 20, 2024
1 parent 292635b commit 108ff18
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
6 changes: 1 addition & 5 deletions ui-core/src/components/inputs/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
disabled={disabled}
required={required}
small={small}
statusIconPosition={
statusWithMessage?.tooltip === 'left' || statusWithMessage?.tooltip === 'right'
? 'before-status-message'
: undefined
}
statusIconPosition={statusWithMessage?.tooltip ? 'before-status-message' : undefined}
className={cx('input-field-wrapper', inputFieldWrapperClassname)}
>
<div
Expand Down
2 changes: 1 addition & 1 deletion ui-core/src/components/inputs/InputStatusIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const InputStatusIcon = ({ status, small, className }: InputStatusIconProps) =>
return (
<span className={cx('status-icon', className, status)}>
{status === 'loading' && <Gear size={size} />}
{status === 'info' && <Info size={size} />}
{status === 'info' && <Info variant="fill" size={size} />}
{status === 'success' && <CheckCircle variant="fill" size={size} />}
{status === 'warning' && <Alert variant="fill" size={size} />}
{status === 'error' && <Blocked variant="fill" size={size} />}
Expand Down
4 changes: 4 additions & 0 deletions ui-core/src/styles/inputs/fieldWrapper.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
position: relative;
padding: 0.625rem 0.813rem 1rem 1rem;

&.success:not(:has(.status-message-wrapper-tooltip)) {
@apply bg-success-5;
}

&.info:not(:has(.status-message-wrapper-tooltip)) {
@apply bg-info-5;
}
Expand Down
12 changes: 10 additions & 2 deletions ui-core/src/styles/inputs/statusMessage.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
--tooltip-overlap: 5px;
}

&.success {
background-color: theme('colors.success.5');
}

&.error {
background-color: theme('colors.error.5');
}
Expand All @@ -74,17 +78,21 @@
}

&.tooltip-left {
left: -5px;
left: 8px;
}

&.tooltip-right {
right: -5px;
right: 8px;
}

.status-message {
font-weight: 600;
text-align: left;

&.success {
color: theme('colors.success.60');
}

&.error {
color: theme('colors.error.60');
}
Expand Down

0 comments on commit 108ff18

Please sign in to comment.