diff --git a/services/web/frontend/js/features/history/components/file-tree/history-file-tree-item.tsx b/services/web/frontend/js/features/history/components/file-tree/history-file-tree-item.tsx index 0a0eade3c8..47429c7187 100644 --- a/services/web/frontend/js/features/history/components/file-tree/history-file-tree-item.tsx +++ b/services/web/frontend/js/features/history/components/file-tree/history-file-tree-item.tsx @@ -20,7 +20,9 @@ export default function FileTreeItem({ diff --git a/services/web/frontend/js/shared/components/badge.tsx b/services/web/frontend/js/shared/components/badge.tsx index 94456525d8..3ab42fdd08 100644 --- a/services/web/frontend/js/shared/components/badge.tsx +++ b/services/web/frontend/js/shared/components/badge.tsx @@ -10,6 +10,7 @@ type BadgeProps = MergeAndOverride< closeButton?: boolean onClose?: (e: React.MouseEvent) => void closeBtnProps?: React.ComponentProps<'button'> + size?: 'sm' } > @@ -20,6 +21,7 @@ function Badge({ closeButton = false, onClose, closeBtnProps, + size, ...rest }: BadgeProps) { return ( diff --git a/services/web/frontend/stylesheets/app/editor/file-tree.less b/services/web/frontend/stylesheets/app/editor/file-tree.less index 2dfd59d8b0..d5a2fac3e5 100644 --- a/services/web/frontend/stylesheets/app/editor/file-tree.less +++ b/services/web/frontend/stylesheets/app/editor/file-tree.less @@ -119,9 +119,7 @@ } .entity > .entity-name > button { - background-color: transparent; - border: 0; - padding: 0; + .reset-button; &:focus { outline: none; } @@ -140,16 +138,10 @@ .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; - } } } } diff --git a/services/web/frontend/stylesheets/components/badge.less b/services/web/frontend/stylesheets/components/badge.less index b194b85572..a0c33446e7 100644 --- a/services/web/frontend/stylesheets/components/badge.less +++ b/services/web/frontend/stylesheets/components/badge.less @@ -1,9 +1,10 @@ .badge-new { + @size: 24px; @padding: 4px; display: inline-flex; align-items: center; overflow: hidden; - height: 24px; + height: @size; padding: @padding; white-space: nowrap; color: @ol-blue-gray-6; @@ -14,19 +15,29 @@ background-color: @neutral-30; } - &-comment { - margin-left: 2px; + &-prepend { + margin-right: 2px; } &-close { .reset-button; - width: 24px; + width: @size; margin-left: 4px; margin-right: -@padding; - font-size: 24px; + font-size: @size; &:hover { background-color: @neutral-40; } } + + &-sm { + @size-sm: 20px; + height: @size-sm; + font-size: @font-size-extra-small; + .badge-new-close { + width: @size-sm; + font-size: @size-sm; + } + } }