Skip to content

Commit

Permalink
fix: reduce hub header panel contrast color button and badge
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Jan 11, 2024
1 parent 4a70b8a commit c64d003
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions uikit/src/badge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const badgeVariants = cva('badge', {
variants: {
themes: {
primary: 'badge-primary',
warning: 'badge-warning',
success: 'badge-success',
secondary: 'badge-secondary',
danger: 'badge-danger',
Expand Down
4 changes: 4 additions & 0 deletions uikit/src/badge/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
@apply border-transparent bg-red-100 text-red-700;
}

&-warning {
@apply border-transparent bg-yellow-100 text-yellow-700;
}

&-outline {
@apply text-foreground border-border border;
}
Expand Down
2 changes: 1 addition & 1 deletion uikit/src/button/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}

&-secondary-blue {
@apply bg-blue-200 text-blue-900 hover:bg-blue-500/80;
@apply bg-blue-200 text-blue-600 hover:bg-blue-500/80;
}

&-danger {
Expand Down
8 changes: 4 additions & 4 deletions web/screens/ExploreModels/ExploreModelItemHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const ExploreModelItemHeader: React.FC<Props> = ({ model, onClick, open }) => {
if (isDownloaded) {
downloadButton = (
<Button
themes="success"
themes="secondaryBlue"
className="min-w-[98px]"
onClick={onUseModelClick}
>
Expand All @@ -92,21 +92,21 @@ const ExploreModelItemHeader: React.FC<Props> = ({ model, onClick, open }) => {

if (minimumRamModel > totalRam) {
return (
<Badge className="rounded-md bg-red-500 text-white">
<Badge className="rounded-md" themes="danger">
Not enough RAM
</Badge>
)
}
if (minimumRamModel < availableRam) {
return (
<Badge className="rounded-md bg-green-500 text-white">
<Badge className="rounded-md" themes="success">
Recommended
</Badge>
)
}
if (minimumRamModel < totalRam && minimumRamModel > availableRam) {
return (
<Badge className="rounded-md bg-yellow-500 text-white">
<Badge className="rounded-md" themes="warning">
Slow on your device
</Badge>
)
Expand Down

0 comments on commit c64d003

Please sign in to comment.