/
gsam
/
ui-kit-ce
Обзор
Документация
Войти
/
gsam
/
ui-kit-ce
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/hooks/examples/InputIdExample.tsx
16 строк
428 B
Строганов Федор
feat: добавлено автосвязывание input и label через id
03 фев 2026, 17:56
03 фев 2026, 17:56
131591d
Код
Авторство
О чём код?
import React from 'react' import { useInputId, UseInputIdProps } from '@v-uik/hooks' export const InputIdExample = ({ customInputId, customHtmlFor, }: UseInputIdProps) => { const { inputId, htmlFor } = useInputId({ customInputId, customHtmlFor }) return ( <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}> <label htmlFor={htmlFor}>Login</label> <input id={inputId} /> </div> ) }