图标按钮 Blade 组件
简介
该按钮组件用于渲染可执行 Action 的可点击按钮:
<x-filament::icon-button
icon="heroicon-m-plus"
wire:click="openNewUserModal"
label="New label"
/>
将图标按钮用作锚链接
默认情况下,图标按钮底层所使用的 HTML 标签时 <button>。使用 tag 属性,你可以将其改成 <a> 标签:
<x-filament::icon-button
icon="heroicon-m-arrow-top-right-on-square"
href="https://filamentphp.com"
tag="a"
label="Filament"
/>
设置图标按钮大小
默认情况下,图标按钮的大小为 "medium"。使用 size 属性,你可以将其改为 "extra small"、"small"、"large" 或者 "extra large":
<x-filament::icon-button
icon="heroicon-m-plus"
size="xs"
label="New label"
/>
<x-filament::icon-button
icon="heroicon-m-plus"
size="sm"
label="New label"
/>
<x-filament::icon-button
icon="heroicon-s-plus"
size="lg"
label="New label"
/>
<x-filament::icon-button
icon="heroicon-s-plus"
size="xl"
label="New label"
/>