Skip to content

Commit

Permalink
Better resource type badge on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
aberonni committed Jan 12, 2024
1 parent e64caa4 commit eb39150
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/ResourceList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,13 @@ export const ResourceList = ({
{resource.published ? "Published" : "Pending approval"}
</Badge>
) : (
<Badge variant="secondary">
{ResourceTypeLabels[resource.type]}
<Badge variant="secondary" className="text-nowrap">
<span className="hidden md:block">
{ResourceTypeLabels[resource.type]}
</span>
<span className="block md:hidden">
{ResourceTypeLabels[resource.type].split(" ")[0]}
</span>
</Badge>
)}
</Link>
Expand Down

0 comments on commit eb39150

Please sign in to comment.