mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 18:33:37 -05:00
Implement new style for history file tree badge
GitOrigin-RevId: 6221bc00e5aecf49fd3f2657128d1e9a2d4e648b
This commit is contained in:
parent
0b985c7a0b
commit
8212b686c6
2 changed files with 24 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
||||||
import type { ReactNode } from 'react'
|
import type { ReactNode } from 'react'
|
||||||
import { DiffOperation } from '../../services/types/diff-operation'
|
import type { DiffOperation } from '../../services/types/diff-operation'
|
||||||
|
import Badge from '../../../../shared/components/badge'
|
||||||
|
|
||||||
type FileTreeItemProps = {
|
type FileTreeItemProps = {
|
||||||
name: string
|
name: string
|
||||||
|
@ -17,11 +18,9 @@ export default function FileTreeItem({
|
||||||
<div className="entity-name entity-name-react" role="presentation">
|
<div className="entity-name entity-name-react" role="presentation">
|
||||||
{icons}
|
{icons}
|
||||||
<button className="item-name-button">
|
<button className="item-name-button">
|
||||||
<span>{name}</span>
|
<span className="item-name-button-text">{name}</span>
|
||||||
{operation ? (
|
{operation ? (
|
||||||
<span className="history-file-entity-operation-badge">
|
<Badge className="item-name-button-badge">{operation}</Badge>
|
||||||
{operation}
|
|
||||||
</span>
|
|
||||||
) : null}
|
) : null}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -131,6 +131,26 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-right: 32px;
|
padding-right: 32px;
|
||||||
|
font-weight: normal;
|
||||||
|
|
||||||
|
.item-name-button-text {
|
||||||
|
display: inline-flex;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-name-button-badge {
|
||||||
|
text-transform: capitalize;
|
||||||
|
height: 20px;
|
||||||
|
font-size: @font-size-extra-small;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: @neutral-20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-new-comment {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue