Skip to content

Commit

Permalink
docs: update highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed Dec 16, 2024
1 parent 482f7a5 commit f455af4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/src/content/recipes/checkbox-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Now that our SuperForm is initialized, we can use it to construct our checkbox g

We'll first import the components we'll need from Formsnap, and then setup a `form` element with the `enhance` action to progressively enhance the form with client-side validation.

```svelte title="+page.svelte" {5,15-18}
```svelte title="+page.svelte" {5-13,15-19}
<!-- script context="module" tag -->
<script lang="ts">
import { superForm } from "sveltekit-superforms";
Expand Down Expand Up @@ -148,7 +148,7 @@ Since each checkbox in the group is related to a single field, we'll use a `Fiel

Next, we'll iterate over the `allergies` array and create a [Control](/docs/components/control) that includes a [Label](/docs/components/label) and a checkbox input for each option.

```svelte {5-17}
```svelte {5-15}
<!-- script tags -->
<form method="POST" use:form.enhance>
<Fieldset {form} name="allergies">
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/recipes/dynamic-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ The [Description](/docs/components/description) component will provide additiona

Now that we've scaffolded the `Fieldset`, we can iterate over the `$formData.urls` array to render the individual URL fields, which are represented by the [ElementField](/docs/components/element-field) component.

```svelte title="+page.svelte" {5-18}
```svelte title="+page.svelte" {5-16}
<!-- script tag -->
<form use:enhance method="POST">
<Fieldset {form} name="urls">
Expand Down Expand Up @@ -155,7 +155,7 @@ You should always include a label for each input for accessibility purposes. In

At the moment, the user can only have two URLs in their profile. We want to allow them to add and remove URLs as needed. We can achieve this by adding buttons to add and remove URLs.

```svelte showLineNumbers title="+page.svelte" {23-29,41-43,53}
```svelte showLineNumbers title="+page.svelte" {24-30,41,53}
<script lang="ts">
import { superForm } from "sveltekit-superforms";
import { zodClient } from "sveltekit-superforms/adapters";
Expand Down

0 comments on commit f455af4

Please sign in to comment.