UNPKG

@brizy/ui

Version:
15 lines (14 loc) 758 B
import React, { useCallback } from "react"; import { classNames } from "../../classNamesFn"; import AntInput from "antd/lib/input"; export const ToolbarInput = (props) => { const { onChange, value, disabled, placeholder, onBlur, onFocus, onPressEnter, size, theme } = props; const _onChange = useCallback((e) => { onChange(e.target.value); }, [onChange]); const className = classNames()("toolbar__input", { "toolbar__input--small": size === "small", "toolbar__input--light": theme === "light", }); return (React.createElement(AntInput, { className: className, value: value, disabled: disabled, placeholder: placeholder, onChange: _onChange, onBlur: onBlur, onFocus: onFocus, onPressEnter: onPressEnter })); };