mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
Format tooltip text
This commit is contained in:
1 parent
a52ef648eb
commit
6640bb85bb
1 file changed
+8
-3
@@ -382,6 +382,13 @@ const EntityListItem = ({
|
||||
isLoadingTableMetadata = false,
|
||||
}: EntityListItemProps) => {
|
||||
const isActive = Number(id) === entity.id
|
||||
const formatTooltipText = (entityType: string) => {
|
||||
return Object.entries(ENTITY_TYPE)
|
||||
.find(([, value]) => value === entityType)?.[0]
|
||||
?.toLowerCase()
|
||||
?.split('_')
|
||||
?.join(' ')
|
||||
}
|
||||
|
||||
return (
|
||||
<ProductMenuItem
|
||||
@@ -434,9 +441,7 @@ const EntityListItem = ({
|
||||
].join(' ')}
|
||||
>
|
||||
<span className="text-xs text-scale-1200 capitalize">
|
||||
{Object.entries(ENTITY_TYPE)
|
||||
.find(([, value]) => value === entity.type)?.[0]
|
||||
?.toLowerCase()}
|
||||
{formatTooltipText(entity.type)}
|
||||
</span>
|
||||
</div>
|
||||
</Tooltip.Content>
|
||||
|
||||
Reference in new issue
Block a user