interface SlugFieldProps

Passed to SlugField by DumpEdit's and PlaylistEditForm's forms, which send the slug only when it differs from saved.slug.

Type Parameters

T extends FieldValues

Properties

name: Path<T>

The form's slug field.

titleName: Path<T>

The form's title field, which the slug follows until it is typed in.

prefix: string

The page's path up to the slug, such as /@bob/dumps/.

saved: { title: string; slug: string; }

The item as saved, whose slug a title put back to its own restores.

optional
inputClassName: string

For a form outside .form, whose inputs take their own class.

Usage

import { type SlugFieldProps } from "src/components/form/SlugField.tsx";