UNPKG

reakit

Version:

Toolkit for building accessible rich web apps with React

9 lines (7 loc) 240 B
import { formatInputName } from "./formatInputName"; export function getInputId(name: any, baseId: string | undefined, suffix = "") { if (baseId) { return `${baseId}-${formatInputName(name, "-")}${suffix}`; } return undefined; }