Skip to content

Commit 940fa9d

Browse files
scott graysonscott grayson
authored andcommitted
fix: use inline SVG icons instead of Blade components
- Replace Blade component syntax with inline SVG icons - Folder icon: green folder SVG with proper path - Document icon: gray document SVG with proper path - Icons now display correctly with proper spacing
1 parent 25750ec commit 940fa9d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Resources/LibraryItemResource.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,10 @@ public static function table(Table $table): Table
9393
->searchable()
9494
->sortable()
9595
->formatStateUsing(function (LibraryItem $record): string {
96-
$icon = $record->type === 'folder' ? 'heroicon-o-folder' : 'heroicon-o-document';
97-
$color = $record->type === 'folder' ? 'text-green-500' : 'text-gray-500';
98-
return "<div class='flex items-center gap-2'><x-heroicon-o-{$icon} class='w-4 h-4 {$color}' /><span>{$record->name}</span></div>";
96+
$iconSvg = $record->type === 'folder'
97+
? '<svg class="w-4 h-4 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"></path></svg>'
98+
: '<svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg>';
99+
return "<div class='flex items-center gap-2'>{$iconSvg}<span>{$record->name}</span></div>";
99100
})
100101
->html(),
101102
Tables\Columns\TextColumn::make('creator.name')

0 commit comments

Comments
 (0)