feat(IconButton): add conditional rendering

This commit is contained in:
Ilia Mashkov
2026-02-19 13:55:11 +03:00
parent 935b065843
commit 9d1f59d819

View File

@@ -41,7 +41,7 @@ let { rotation = 'clockwise', icon, ...rest }: Props = $props();
size="icon"
{...rest}
>
{@render icon({
{@render icon?.({
className: cn(
'size-4 transition-all duration-200 stroke-[1.5] stroke-text-muted group-hover:stroke-foreground group-hover:scale-110 group-hover:stroke-2 group-active:scale-90 group-disabled:stroke-transparent',
rotation === 'clockwise'