Skip to content

Commit

Permalink
docs: fixed imports and removed useless css (#1633)
Browse files Browse the repository at this point in the history
  • Loading branch information
witer33 authored Jan 19, 2025
1 parent 6659ad9 commit 3dc8f14
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions sites/docs/src/content/components/data-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ We'll start by defining the actions menu in our `data-table-actions.svelte` comp
class="relative size-8 p-0"
>
<span class="sr-only">Open menu</span>
<Ellipsis class="size-4" />
<Ellipsis />
</Button>
{/snippet}
</DropdownMenu.Trigger>
Expand All @@ -360,8 +360,7 @@ Now that we've defined the `<DataTableActions />` component, let's update our `a

```ts showLineNumbers title="routes/payments/columns.ts"
import type { ColumnDef } from "@tanstack/table-core";
import { createRawSnippet } from "svelte";
import { renderSnippet } from "$lib/components/ui/data-table/index.js";
import { renderComponent } from "$lib/components/ui/data-table/index.js";
import DataTableActions from "./data-table-actions.svelte";

export const columns: ColumnDef<Payment>[] = [
Expand Down Expand Up @@ -506,7 +505,7 @@ We'll start by creating a component to render a sortable email header button.
<Button {variant} {...restProps}>
Email
<ArrowUpDown class="ml-2 size-4" />
<ArrowUpDown class="ml-2" />
</Button>
```

Expand Down Expand Up @@ -568,10 +567,7 @@ We can now update the `email` header cell to add sorting controls.

```ts showLineNumbers title="src/routes/payments/columns.ts"
import type { ColumnDef } from "@tanstack/table-core";
import {
renderComponent,
renderSnippet,
} from "$lib/components/ui/data-table/index.js";
import { renderComponent } from "$lib/components/ui/data-table/index.js";
import DataTableEmailButton from "./data-table-email-button.svelte";

export const columns: ColumnDef<Payment>[] = [
Expand Down Expand Up @@ -843,10 +839,7 @@ Now that we have a new component, we can add a `select` column definition to ren

```ts showLineNumbers title="routes/payments/columns.ts"
import type { ColumnDef } from "@tanstack/table-core";
import {
renderSnippet,
renderComponent,
} from "$lib/components/ui/data-table/index.js";
import { renderComponent } from "$lib/components/ui/data-table/index.js";
import { Checkbox } from "$lib/components/ui/checkbox/index.js";

export const columns: ColumnDef<Payment>[] = [
Expand Down

0 comments on commit 3dc8f14

Please sign in to comment.