Skip to content

Commit

Permalink
fix: some costmetic issues: badges corner, recommended for tensorrt m…
Browse files Browse the repository at this point in the history
…odels(janhq#2346)

Signed-off-by: hiro <[email protected]>
Co-authored-by: hiro <[email protected]>
  • Loading branch information
namchuai and jan-hiro-v authored Mar 14, 2024
1 parent 561b1dd commit 03a0978
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion uikit/src/badge/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.badge {
@apply focus:ring-ring border-border inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2;
@apply focus:ring-ring border-border inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2;

&-primary {
@apply border-transparent bg-blue-100 text-blue-600;
Expand Down
2 changes: 1 addition & 1 deletion web/containers/DropdownListSidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ const DropdownListSidebar = ({
<span className="font-bold text-muted-foreground">
{toGibibytes(x.metadata.size)}
</span>
{x.engine == InferenceEngine.nitro && (
{x.metadata.size && (
<ModelLabel size={x.metadata.size} />
)}
</div>
Expand Down
7 changes: 4 additions & 3 deletions web/screens/ExploreModels/ExploreModelItemHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ type EngineBadgeProps = {
const EngineBadge: React.FC<EngineBadgeProps> = ({ engine }) => {
switch (engine) {
case 'nitro-tensorrt-llm':
const title = 'TensorRT-LLM'
return (
<div className="flex items-center justify-center rounded-md bg-[#EFF6FF] px-2 py-[2px] font-semibold text-primary">
TensorRT-LLM
</div>
<Badge themes="primary" className="line-clamp-1" title={title}>
{title}
</Badge>
)
default:
return null
Expand Down

0 comments on commit 03a0978

Please sign in to comment.