Can't use svg in TextColumn

What I want to achive is a column which shows an icon and when you click on it, a defined text is copied to the clipboard.

The problem is, that the IconColumn has no copyable method, so I tried to use the
TextColumn
:

TextColumn::make("copy_column")
  ->getStateUsing("Copy")
  ->copyable()
  ->copyableState(fn($record) => $record->id)


this works as expected and it shows the text "Copy". Now I tried to use an icon:

TextColumn::make("copy_column")
            ->getStateUsing(function() {
                return new HtmlString(
                    '<svg style="width: 20px; height: 20px;" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true">
                      <path stroke-linecap="round" stroke-linejoin="round" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"></path>
                    </svg>');
            })
            ->html()
            ->copyable()
            ->copyableState(fn($record) => $record->id)


but the column is empty. Any ideas?
Solution
ugly, but maybe this works
->icon('heroicon-o-clipboard')
->getStateUsing(fn () => '<span></span>')
->html()
Was this page helpful?