Skip to content

Commit ff68176

Browse files
committed
Update structure of Table docs
1 parent 9fec86d commit ff68176

File tree

4 files changed

+43
-5
lines changed

4 files changed

+43
-5
lines changed

src/routes/components/table/+page.svelte

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import '$lib/css/themes/theme-bexis2.css';
3+
import TableProps from './docs/TableProps.svelte';
34
import TableConfigDocs from './docs/TableConfigDocs.svelte';
45
import ColumnsDocs from './docs/ColumnsDocs.svelte';
56
import ColumnDocs from './docs/ColumnDocs.svelte';
@@ -15,6 +16,8 @@
1516
>
1617
<div class="grid gap-5">
1718
<h1 class="font-bold !text-6xl">Table</h1>
19+
<h2 class="h2">Props</h2>
20+
<TableProps />
1821
<h2 class="h2">Types</h2>
1922
<TableConfigDocs />
2023
</div>

src/routes/components/table/docs/ColumnInstructionsDocs.svelte

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,21 @@
6060

6161
<div class="ml-5">
6262
<p class="underline">
63-
<code class="!text-xl bg-tertiary-300 dark:bg-tertiary-700/50 rounded-md p-0.5 text-primary-500"
63+
<code
64+
class="!text-xl bg-tertiary-300 dark:bg-tertiary-700/50 rounded-md p-0.5 text-primary-500"
6465
>renderComponent</code
6566
>
6667
overrides
67-
<code class="!text-xl bg-tertiary-300 dark:bg-tertiary-700/50 rounded-md p-0.5 text-primary-500">toStringFn</code>.
68+
<code
69+
class="!text-xl bg-tertiary-300 dark:bg-tertiary-700/50 rounded-md p-0.5 text-primary-500"
70+
>toStringFn</code
71+
>.
6872
</p>
6973
<p class="">
70-
Every <code class="!text-xl bg-tertiary-300 dark:bg-tertiary-700/50 rounded-md p-0.5 text-primary-500"
74+
Every <code
75+
class="!text-xl bg-tertiary-300 dark:bg-tertiary-700/50 rounded-md p-0.5 text-primary-500"
7176
>renderComponent</code
72-
> will get 2 props:
77+
> will get 3 props:
7378
</p>
7479
<div class="items-center mt-2">
7580
<div class="flex gap-2">
@@ -87,6 +92,22 @@
8792
</div>
8893
<p class="text-xl pl-10">The value of the current cell.</p>
8994
</div>
95+
<div class="items-center mt-2">
96+
<div class="flex gap-2">
97+
<div class="italic">dispatchFn:</div>
98+
<div class="font-bold">{`(obj: any) => dispatch('action', obj)`}</div>
99+
</div>
100+
<p class="text-xl pl-10">
101+
A function that takes an object and dispatches an action with the name <code
102+
class="!text-xl bg-tertiary-300 dark:bg-tertiary-700/50 rounded-md p-0.5 text-primary-500"
103+
>action</code
104+
>. The passed object is accessible by the parent component through the
105+
<code
106+
class="!text-xl bg-tertiary-300 dark:bg-tertiary-700/50 rounded-md p-0.5 text-primary-500"
107+
>action.detail</code
108+
> property.
109+
</p>
110+
</div>
90111
</div>
91112
</div>
92113
</div>

src/routes/components/table/docs/TableConfigDocs.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
</div>
156156

157157
<p class="text-xl pl-10">
158-
An array of page sizes to be used for the table. By default, page sizes are 5, 10, 15, 20.
158+
An array of page sizes to be used for the table. By default, page sizes are 5, 10, 20, 50, 100.
159159
</p>
160160
</div>
161161

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<div class="grid gap-5">
2+
<div class="grid gap-2" id="tableProps">
3+
<div class="italic div">Underlined attributes are <strong>required</strong>.</div>
4+
</div>
5+
6+
<div class="items-center">
7+
<div class="flex gap-2">
8+
<div class="italic underline">config:</div>
9+
<div class="font-bold">{`TableConfig <T>`}</div>
10+
</div>
11+
12+
<p class="text-xl pl-10">Configuration for the table.</p>
13+
</div>
14+
</div>

0 commit comments

Comments
 (0)