Skip to the content

Capsid menu

app/components/admin/bulk-tag-controls.tsx

30 lines and 2 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.

Functions

The functions of bulk-tag-controls.tsx
FunctionLinesComplexityCoveredCRAPMutation
BulkTagControls2 to 301No data: no coverage report in this mapNo data: no coverage report in this mapNo data: no mutants in this code
<anonymous:18>18 to 201No data: no coverage report in this mapNo data: no coverage report in this mapNo data: no mutants in this code

Imports

It imports no other module of this repo. Imported by app/components/admin/media-bulk-bar.tsx, app/components/admin/posts-table.tsx.

Source

/** The tag field and its Add and Remove submits, for a bulk bar inside the selection's form. */
export function BulkTagControls({ listId, options }: { listId: string; options: string[] }) {
  return (
    <>
      <span className="cap-bulk-field">
        <label htmlFor={`${listId}-field`}>Tag</label>
        <input
          id={`${listId}-field`}
          className="cap-input"
          type="text"
          name="tag"
          list={listId}
          autoComplete="off"
          placeholder="tag name"
        />
      </span>
      <datalist id={listId}>
        {options.map((tag) => (
          <option key={tag} value={tag} />
        ))}
      </datalist>
      <button type="submit" name="intent" value="bulk-add-tag" className="cap-btn">
        Add tag
      </button>
      <button type="submit" name="intent" value="bulk-remove-tag" className="cap-btn">
        Remove tag
      </button>
    </>
  );
}