mirror of
https://github.com/snowball-tools/snowballtools-base.git
synced 2025-01-08 03:28:05 +00:00
feat: see all button functions
This commit is contained in:
parent
f38dfb5604
commit
9f25059c3c
@ -4,22 +4,33 @@ import { GitCommitWithBranch } from 'types';
|
|||||||
import { Heading } from 'components/shared/Heading';
|
import { Heading } from 'components/shared/Heading';
|
||||||
import ActivityCard from './ActivityCard';
|
import ActivityCard from './ActivityCard';
|
||||||
import { Button } from 'components/shared/Button';
|
import { Button } from 'components/shared/Button';
|
||||||
import { LoadingIcon } from 'components/shared/CustomIcon';
|
import { LoadingIcon, LinkIcon } from 'components/shared/CustomIcon';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
export const Activity = ({
|
export const Activity = ({
|
||||||
isLoading,
|
isLoading,
|
||||||
activities,
|
activities,
|
||||||
|
repoPath,
|
||||||
}: {
|
}: {
|
||||||
isLoading: boolean;
|
isLoading: boolean;
|
||||||
activities: GitCommitWithBranch[];
|
activities: GitCommitWithBranch[];
|
||||||
|
repoPath: string;
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div className="col-span-5 md:col-span-2 mr-1">
|
<div className="col-span-5 md:col-span-2 mr-1">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<Heading className="text-lg leading-6 font-medium">Activity</Heading>
|
<Heading className="text-lg leading-6 font-medium">Activity</Heading>
|
||||||
<Button variant="tertiary" size="sm">
|
<Link to={`https://github.com/${repoPath}/activity`} target="_blank">
|
||||||
See all
|
<Button
|
||||||
</Button>
|
variant="tertiary"
|
||||||
|
size="sm"
|
||||||
|
rightIcon={
|
||||||
|
<LinkIcon className="group-hover:rotate-45 transition-transform" />
|
||||||
|
}
|
||||||
|
>
|
||||||
|
See all
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-5">
|
<div className="mt-5">
|
||||||
{isLoading ? (
|
{isLoading ? (
|
||||||
|
@ -16,6 +16,7 @@ import { ChevronLeft } from 'components/shared/CustomIcon';
|
|||||||
import { WavyBorder } from 'components/shared/WavyBorder';
|
import { WavyBorder } from 'components/shared/WavyBorder';
|
||||||
import { Heading } from 'components/shared/Heading';
|
import { Heading } from 'components/shared/Heading';
|
||||||
import { Tabs } from 'components/shared/Tabs';
|
import { Tabs } from 'components/shared/Tabs';
|
||||||
|
import { LinkIcon } from 'components/shared/CustomIcon';
|
||||||
|
|
||||||
const Id = () => {
|
const Id = () => {
|
||||||
const { id } = useParams();
|
const { id } = useParams();
|
||||||
@ -88,6 +89,9 @@ const Id = () => {
|
|||||||
{...buttonSize}
|
{...buttonSize}
|
||||||
className="h-11 transition-colors"
|
className="h-11 transition-colors"
|
||||||
variant="tertiary"
|
variant="tertiary"
|
||||||
|
rightIcon={
|
||||||
|
<LinkIcon className="group-hover:rotate-45 transition-transform" />
|
||||||
|
}
|
||||||
>
|
>
|
||||||
Open repo
|
Open repo
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -221,7 +221,11 @@ const OverviewTabPanel = () => {
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<Activity activities={activities} isLoading={fetchingActivities} />
|
<Activity
|
||||||
|
activities={activities}
|
||||||
|
isLoading={fetchingActivities}
|
||||||
|
repoPath={project.repository}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user