Skip to content

Commit

Permalink
fix: IconifyIconLoader, downloaded icon content, replace static width…
Browse files Browse the repository at this point in the history
…/height to class/size blade variables
  • Loading branch information
JeRabix committed Sep 14, 2024
1 parent 527b204 commit 7d3e896
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/IconLoaders/Iconify/IconifyIconLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ private function downloadIcons(): void
throw new Exception("Cannot download icon: $icon. By API url: $apiUrl");
}

$iconContent = str_replace(
'width="1em" height="1em"',
'class="fill-current w-{{ $size ?? 5 }} h-{{ $size ?? 5 }} {{ $class ?? \'\' }} {{ !empty($color) ? "text-$color" : \'\' }}"',
$iconContent
);


file_put_contents("$path/$iconName.blade.php", $iconContent);
}
}
Expand Down

0 comments on commit 7d3e896

Please sign in to comment.