STableCell <s-table-cell>
Table row की एक cell। STableCell Shopify के Polaris <s-table-cell> web component का typed Vue 3 wrapper है।
ts
import { STableCell } from 'polaris-vue-elements'उदाहरण
vue
<script setup>
import {
STable,
STableHeaderRow,
STableHeader,
STableBody,
STableRow,
STableCell,
SBadge,
} from 'polaris-vue-elements'
</script>
<template>
<STable variant="auto">
<STableHeaderRow>
<STableHeader listSlot="primary">Order</STableHeader>
<STableHeader listSlot="secondary">Customer</STableHeader>
<STableHeader format="currency">Total</STableHeader>
<STableHeader>Status</STableHeader>
</STableHeaderRow>
<STableBody>
<STableRow>
<!-- STableCell holds one field's value; it can contain any content, including
other components like SBadge. -->
<STableCell>#1001</STableCell>
<STableCell>Alex Morgan</STableCell>
<STableCell>$120.00</STableCell>
<STableCell><SBadge tone="success">Fulfilled</SBadge></STableCell>
</STableRow>
<STableRow>
<STableCell>#1002</STableCell>
<STableCell>Sam Rivera</STableCell>
<STableCell>$45.50</STableCell>
<STableCell><SBadge tone="warning">Pending</SBadge></STableCell>
</STableRow>
<STableRow>
<STableCell>#1003</STableCell>
<STableCell>Jamie Lee</STableCell>
<STableCell>$310.25</STableCell>
<STableCell><SBadge tone="critical">Cancelled</SBadge></STableCell>
</STableRow>
</STableBody>
</STable>
</template>Props
| Prop | Type | विवरण |
|---|---|---|
children | any | table cell के अंदर दिखाई जाने वाली सामग्री, जो table की grid संरचना में एक अकेले data point को दर्शाती है। |
id | string | undefined | element के लिए एक unique identifier। |
Slots
| Slot | विवरण |
|---|---|
default | table cell के अंदर दिखाई जाने वाली सामग्री, जो table की grid संरचना में एक अकेले data point को दर्शाती है। |