UNPKG

@yandex/ui

Version:

Yandex UI components

18 lines (17 loc) 841 B
import { __read } from "tslib"; import React, { useState } from 'react'; import { withDebounceInput } from '@yandex-lego/components/withDebounceInput'; import { Textinput } from '@yandex-lego/components/Textinput/Textinput.bundle/desktop'; var DebouncedInput = withDebounceInput(Textinput); export var Enter = function () { var _a = __read(useState(''), 2), value = _a[0], setValue = _a[1]; return (React.createElement(React.Fragment, null, React.createElement(DebouncedInput, { value: value, onChange: function (e) { return setValue(e.target.value); }, debounceTimeout: 1000, view: "default", size: "m", forceNotifyByEnter: true }), " ", React.createElement("br", null), " ", React.createElement("br", null), React.createElement("b", null, "Value:"), " ", value)); };