Skip to content

Commit

Permalink
fix so margin is not baked in
Browse files Browse the repository at this point in the history
  • Loading branch information
suejung-sentry committed Oct 29, 2024
1 parent 862004e commit 5e20b9e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/layouts/Header/components/Navigator/Navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Navigator({ currentUser }: NavigatorProps) {
<Breadcrumb paths={breadcrumbs} largeFont />{' '}
</span>
{isCurrentUserPartOfOrg === false ? (
<Label variant="plain" className="hidden sm:block">
<Label variant="plain" className="ml-2 hidden sm:block">
Viewing as visitor
</Label>
) : null}
Expand Down Expand Up @@ -63,7 +63,7 @@ function Navigator({ currentUser }: NavigatorProps) {
<Avatar user={ownerData} />
<h2 className="mx-2 text-xl font-semibold">{ownerData?.username}</h2>
{isCurrentUserPartOfOrg === false ? (
<Label variant="plain" className="hidden sm:block">
<Label variant="plain" className="ml-2 hidden sm:block">
Viewing as visitor
</Label>
) : null}
Expand All @@ -86,7 +86,7 @@ function Navigator({ currentUser }: NavigatorProps) {
<div className="flex items-center">
<MyContextSwitcher pageName={pageName} />
{isCurrentUserPartOfOrg === false ? (
<Label variant="plain" className="hidden sm:block">
<Label variant="plain" className="ml-2 hidden sm:block">
Viewing as visitor
</Label>
) : null}
Expand Down
30 changes: 25 additions & 5 deletions src/shared/ListRepo/RepoTitleLink/RepoTitleLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,16 @@ function RepoTitleLink({ repo, showRepoOwner, pageName, disabledLink }) {
<span className="font-semibold">{repo.name}</span>
</span>
</div>
{isRepoPrivate && <Label variant="plain">Private</Label>}
{active && !activated && <Label variant="plain">Deactivated</Label>}
{isRepoPrivate && (
<Label variant="plain" className="ml-2">
Private
</Label>
)}
{active && !activated && (
<Label variant="plain" className="ml-2">
Deactivated
</Label>
)}
</div>
)
}
Expand All @@ -52,9 +60,21 @@ function RepoTitleLink({ repo, showRepoOwner, pageName, disabledLink }) {
<span className="font-semibold">{repo.name}</span>
</span>
</AppLink>
{isRepoPrivate && <Label variant="plain">Private</Label>}
{active && !activated && <Label variant="plain">Deactivated</Label>}
{repo?.isDemo && <Label variant="plain">System generated</Label>}
{isRepoPrivate && (
<Label variant="plain" className="ml-2">
Private
</Label>
)}
{active && !activated && (
<Label variant="plain" className="ml-2">
Deactivated
</Label>
)}
{repo?.isDemo && (
<Label variant="plain" className="ml-2">
System generated
</Label>
)}
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/Label/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const label = cva(
default: 'border-current',
subtle: 'border-ds-border-line text-ds-gray-senary bg-ds-gray-primary',
plain:
'ml-2 py-0.5 border-ds-gray-tertiary text-ds-gray-senary dark:bg-ds-gray-tertiary dark:text-ds-secondary-text',
'py-0.5 border-ds-gray-tertiary text-ds-gray-senary dark:bg-ds-gray-tertiary dark:text-ds-secondary-text',
},
},
defaultVariants: {
Expand Down

0 comments on commit 5e20b9e

Please sign in to comment.