Files
openchamber/packages/ui/src/components/views/git/GitEmptyState.tsx
T
Bohdan Triapitsyn 0a425cd882 feat: reorganize git view layout and add history/branch actions (#354)
* feat(ui): redesigned Git view layout

* feat: stabilize git views layout with min-h-0 and scroll

- Introduce min-h-0 and flex-1 on git layout containers
- Apply min-h-0 on PR checks dialog content and related areas
- Configure ScrollableOverlay to disable horizontal scroll and overscroll
2026-02-08 12:16:39 +02:00

43 lines
1.1 KiB
TypeScript

import React from 'react';
import { RiGitCommitLine, RiArrowDownLine, RiLoader4Line } from '@remixicon/react';
import { Button } from '@/components/ui/button';
interface GitEmptyStateProps {
behind: number;
onPull: () => void;
isPulling: boolean;
}
export const GitEmptyState: React.FC<GitEmptyStateProps> = ({
behind,
onPull,
isPulling,
}) => {
return (
<div className="flex flex-col items-center justify-center py-10 px-4 text-center">
<RiGitCommitLine className="size-10 text-muted-foreground/70 mb-4" />
<p className="typography-ui-label font-semibold text-foreground mb-1">
Working tree clean
</p>
<p className="typography-meta text-muted-foreground mb-4">
All changes have been committed
</p>
{behind > 0 && (
<Button
variant="outline"
onClick={onPull}
disabled={isPulling}
>
{isPulling ? (
<RiLoader4Line className="size-4 animate-spin" />
) : (
<RiArrowDownLine className="size-4" />
)}
Pull {behind} commit{behind === 1 ? '' : 's'}
</Button>
)}
</div>
);
};