Skip to content

Commit

Permalink
fix(EntityStatus): set minimum container width (#1494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raubzeug authored Oct 18, 2024
1 parent a36d40c commit d6c6a4c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/components/EntityStatus/EntityStatus.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
display: inline-flex;
align-items: center;

min-width: 90px;
max-width: 100%;
height: 100%;

Expand Down
11 changes: 9 additions & 2 deletions src/components/MonitoringButton/MonitoringButton.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type {ButtonSize} from '@gravity-ui/uikit';
import {Button, Icon} from '@gravity-ui/uikit';

import {cn} from '../../utils/cn';
Expand All @@ -12,15 +13,21 @@ interface MonitoringButtonProps {
className?: string;
visible?: boolean;
href: string;
size?: ButtonSize;
}

export function MonitoringButton({href, visible = false, className}: MonitoringButtonProps) {
export function MonitoringButton({
href,
visible = false,
className,
size = 's',
}: MonitoringButtonProps) {
return (
<Button
href={href}
target="_blank"
className={b({visible}, className)}
size="s"
size={size}
title="Monitoring dashboard"
>
<Icon data={monitoringIcon} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function ExtendedTenant({
dbName,
dbType,
});
return href ? <MonitoringButton href={href} visible={true} /> : null;
return href ? <MonitoringButton href={href} visible={true} size="xs" /> : null;
}

return null;
Expand Down

0 comments on commit d6c6a4c

Please sign in to comment.