From dfa771b9923d97be7f67db8d35ee62e14eefda1f Mon Sep 17 00:00:00 2001 From: palewire Date: Mon, 3 Apr 2023 10:38:54 -0400 Subject: [PATCH] Documentation fixes --- src/components/Table/Table.stories.svelte | 15 +++++---------- src/components/Table/stories/docs/both.md | 15 ++++++++------- src/components/Table/stories/docs/filter.md | 11 ++++++----- src/components/Table/stories/docs/format.md | 18 +++++++++--------- src/components/Table/stories/docs/paginate.md | 2 +- src/components/Table/stories/docs/search.md | 10 +++++----- src/components/Table/stories/docs/sort.md | 12 ++++++------ src/components/Table/stories/docs/truncate.md | 2 +- 8 files changed, 41 insertions(+), 44 deletions(-) diff --git a/src/components/Table/Table.stories.svelte b/src/components/Table/Table.stories.svelte index c0989d1a..e6978261 100644 --- a/src/components/Table/Table.stories.svelte +++ b/src/components/Table/Table.stories.svelte @@ -89,8 +89,7 @@ data: pressFreedom, title: 'Press Freedom Index', paginated: true, - source: - "Source: Reporters Without Borders", + source: 'Source: Reporters Without Borders', }}" /> @@ -102,8 +101,7 @@ searchable: true, paginated: true, title: 'Press Freedom Index', - source: - "Source: Reporters Without Borders", + source: 'Source: Reporters Without Borders', }}" /> @@ -115,8 +113,7 @@ paginated: true, filterField: 'Region', title: 'Press Freedom Index', - notes: - "Source: Reporters Without Borders", + notes: 'Source: Reporters Without Borders', }}" /> @@ -130,8 +127,7 @@ paginated: true, title: 'Press Freedom Index', dek: 'Reporters Without Borders ranks countries based on their level of press freedom using criteria such as the degree of media pluralism and violence against journalists.', - source: - "Source: Reporters Without Borders", + source: 'Source: Reporters Without Borders', }}" /> @@ -145,8 +141,7 @@ sortDirection: 'descending', paginated: true, title: 'Press Freedom Index', - source: - "Source: Reporters Without Borders", + source: 'Source: Reporters Without Borders', }}" /> diff --git a/src/components/Table/stories/docs/both.md b/src/components/Table/stories/docs/both.md index a790937d..a553e365 100644 --- a/src/components/Table/stories/docs/both.md +++ b/src/components/Table/stories/docs/both.md @@ -2,12 +2,13 @@ Feel free to both search and filter. ```svelte Reporters Without Borders'}", + data="{yourData}" + , + searchable="{true}" + filterField="{'Region'}" + paginated="{true}" + title="{'Press Freedom Index'}" + dek="{'Reporters Without Borders ranks countries based on their level of press freedom using criteria such as the degree of media pluralism and violence against journalists.'}" + source="{'Source: Reporters Without Borders'}" /> ``` diff --git a/src/components/Table/stories/docs/filter.md b/src/components/Table/stories/docs/filter.md index b75782e3..8792110b 100644 --- a/src/components/Table/stories/docs/filter.md +++ b/src/components/Table/stories/docs/filter.md @@ -2,10 +2,11 @@ Allow users to filter the table by providing one of the attributes as the `filte ```svelte
Reporters Without Borders'}", + data="{yourData}" + , + filterField="{'Region'}" + paginated="{true}" + title="{'Press Freedom Index'}" + notes="{'Source: Reporters Without Borders'}" /> ``` diff --git a/src/components/Table/stories/docs/format.md b/src/components/Table/stories/docs/format.md index 84ac6e96..5c4aa792 100644 --- a/src/components/Table/stories/docs/format.md +++ b/src/components/Table/stories/docs/format.md @@ -4,18 +4,18 @@ Among other things, this feature can be used to provide a unit of measurement wi ```svelte
``` diff --git a/src/components/Table/stories/docs/paginate.md b/src/components/Table/stories/docs/paginate.md index ac6f2361..fe083921 100644 --- a/src/components/Table/stories/docs/paginate.md +++ b/src/components/Table/stories/docs/paginate.md @@ -9,6 +9,6 @@ This is a good option when publishing large tables for readers to explore. It wo data="{yourData}" paginated="{true}" title="{'Press Freedom Index'}" - source="{'Reporters Without Borders'}" + source="{'Reporters Without Borders'}" /> ``` diff --git a/src/components/Table/stories/docs/search.md b/src/components/Table/stories/docs/search.md index 1752f7f5..31db208b 100644 --- a/src/components/Table/stories/docs/search.md +++ b/src/components/Table/stories/docs/search.md @@ -2,10 +2,10 @@ Allow users to search the table by setting the optional `searchable` variable. M ```svelte
Reporters Without Borders'}", + data="{yourData}" + searchable="{true}" + paginated="{true}" + title="{'Press Freedom Index'}" + notes="{'Source: Reporters Without Borders'}" /> ``` diff --git a/src/components/Table/stories/docs/sort.md b/src/components/Table/stories/docs/sort.md index 57e03e5a..5b0a5908 100644 --- a/src/components/Table/stories/docs/sort.md +++ b/src/components/Table/stories/docs/sort.md @@ -1,12 +1,12 @@ -Allow users to sort the table by setting the `searchable` input. Specify the starting order by setting `sortField` to a column name and `sortDirection` to `ascending` or `descending`. +Allow users to sort the table by setting the `sortable` input. Specify the starting order by setting `sortField` to a column name and `sortDirection` to `ascending` or `descending`. ```svelte
Reporters Without Borders'}," + sortable="{true}" + sortField="{'Score'}" + sortDirection="{'descending'}" + title="{'Press Freedom Index'}" + source="{'Source: Reporters Without Borders'}" /> ``` diff --git a/src/components/Table/stories/docs/truncate.md b/src/components/Table/stories/docs/truncate.md index 7fbdfcc5..3867d9ee 100644 --- a/src/components/Table/stories/docs/truncate.md +++ b/src/components/Table/stories/docs/truncate.md @@ -1,4 +1,4 @@ -When you table has 10 or more rows, consider clipping it by setting the `truncated` option. When it is enabled, the table is clipped and readers must request to see all rows by clicking a button below the table. By default this configuration will limit the table to five records. You can adjust the cutoff point by adjusting the `truncateLength` option. +When you table has 10 or more rows, consider clipping it by setting the `truncated` option. When it is enabled, the table is clipped and readers must request to see all rows by clicking a button below the table. By default this configuration will limit the table to five records. You can change the cutoff point by adjusting the `truncateLength` option. This is a good option for simple tables with row counts between 10 and 30. It works best when the table doesn't require interactivity.