mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
feat: update meta bar
This commit is contained in:
parent
1691e28a06
commit
91954268ba
2 changed files with 17 additions and 11 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { Breadcrumb } from '@primer/components'
|
||||
import { BranchName, Breadcrumb, Flex, Grid, Text } from '@primer/components'
|
||||
import { GitBranchIcon } from '@primer/octicons-react'
|
||||
import * as React from 'react'
|
||||
|
||||
type Props = {
|
||||
|
|
@ -7,14 +8,21 @@ type Props = {
|
|||
|
||||
export function MetaBar({ metaData: { userName, repoName, branchName, repoUrl, userUrl } }: Props) {
|
||||
return (
|
||||
<div className={'meta-bar'}>
|
||||
<Flex flexDirection="column" justifyContent="space-between" className={'meta-bar'}>
|
||||
<Breadcrumb>
|
||||
<Breadcrumb.Item href={userUrl}>{userName}</Breadcrumb.Item>
|
||||
<Breadcrumb.Item className={'repo-name'} href={repoUrl}>
|
||||
{repoName}
|
||||
<Breadcrumb.Item href={repoUrl}>
|
||||
<Text fontWeight="bolder">{repoName}</Text>
|
||||
</Breadcrumb.Item>
|
||||
<Breadcrumb.Item selected>{branchName}</Breadcrumb.Item>
|
||||
</Breadcrumb>
|
||||
</div>
|
||||
<Grid gridTemplateColumns="repeat(2, max-content)">
|
||||
<div className={'octicon-wrapper'}>
|
||||
<GitBranchIcon size="small" />
|
||||
</div>
|
||||
<BranchName as="span" backgroundColor="blue.0">
|
||||
{branchName}
|
||||
</BranchName>
|
||||
</Grid>
|
||||
</Flex>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -278,13 +278,11 @@ $minimal-z-index: max($github-header-z-index, $github-pull-request-float-header-
|
|||
|
||||
.meta-bar {
|
||||
position: relative; // prevent overlap by outline of other elements
|
||||
padding: 10px;
|
||||
height: 53px; // GitHub header height if login
|
||||
flex-shrink: 0;
|
||||
padding: 4px 10px;
|
||||
padding-right: 30px; // space for toggle button
|
||||
background: $bg-blue-light;
|
||||
|
||||
.repo-name {
|
||||
font-weight: bolder;
|
||||
}
|
||||
}
|
||||
|
||||
.description {
|
||||
|
|
|
|||
Loading…
Reference in a new issue