File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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 ' )
You can’t perform that action at this time.
0 commit comments