UNPKG
@twilio-paste/paste-reakit-fork
Version:
latest (1.4.1)
1.4.1
Forked Reakit that addresses SSR hydration issues
twilio-labs/paste-reakit
@twilio-paste/paste-reakit-fork
/
src
/
Form
/
__utils
/
getInputId.ts
9 lines
(7 loc)
•
240 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
import
{ formatInputName }
from
"./formatInputName"
;
export
function
getInputId
(
name
:
any
,
baseId
:
string
|
undefined
, suffix =
""
) {
if
(baseId) {
return
`
${baseId}
-
${formatInputName(name,
"-"
)}
${suffix}
`
; }
return
undefined
; }