🔥 認識我們的新專案 t0ggles - 您終極的專案管理工具! 🔥

列表按鈕 Svelte 組件

列表按鈕旨在 列表 Svelte 組件 內部使用。

列表按鈕組件

包含以下組件

  • ListButton

ListButton 屬性

名稱類型預設值描述
colors物件

具有 Tailwind CSS 顏色類別的物件

colors.activeBgIos字串'active:bg-primary active:bg-opacity-15'
colors.activeBgMaterial字串''
colors.textIos字串'text-primary'
colors.textMaterial字串'text-md-light-primary dark:text-md-dark-primary'
colors.touchRipple字串'touch-ripple-primary'
href字串

按鈕的連結 href 屬性

linkComponent字串'a'

按鈕 HTML 元素

linkProps任何

具有要傳遞給連結/按鈕的附加屬性(特性)的物件

target字串

按鈕的連結 target 屬性

touchRipple布林值true

在 Material 主題中啟用觸摸波紋效果

type字串未定義

按鈕的 type 屬性(如果使用 linkComponent: 'button' 呈現為 <button>

value任何

按鈕的 type 屬性(如果使用 linkComponent: 'button' 呈現為 <button>

onClick函式(e)

click 事件處理函式

範例

ListButton.svelte
<script>
import {
Page,
Navbar,
NavbarBackLink,
List,
ListButton,
} from 'konsta/svelte';
</script>
<Page>
<Navbar title="List Button" />
<List>
<ListButton>Button 1</ListButton>
<ListButton>Button 2</ListButton>
<ListButton>Button 3</ListButton>
</List>
<List inset>
<ListButton>Button 1</ListButton>
<ListButton>Button 2</ListButton>
<ListButton>Button 3</ListButton>
</List>
<List inset>
<ListButton className="k-color-brand-red">Red Button</ListButton>
</List>
</Page>
程式碼授權條款為 MIT.
2022 © Konsta UI 由 nolimits4web.