UNPKG

flowstudio

Version:
11 lines 1.04 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Button, Flex, TextField, } from "@radix-ui/themes"; import { useState } from "react"; import { LiaTimesSolid } from "react-icons/lia"; import { Handle, Position } from "@xyflow/react"; export default function InputNode({ id = 'i', y = 100, data }) { const [show, setShow] = useState(false); const handleClick = () => setShow(!show); return (_jsxs(Flex, { position: 'relative', children: [_jsx(TextField.Root, { type: 'text', id: 'text_value', placeholder: 'Option Text', autoComplete: 'off', className: "nodrag", children: _jsx(TextField.Slot, { children: _jsx(Button, { "aria-label": 'close', size: '1', variant: 'outline', onClick: handleClick, children: _jsx(LiaTimesSolid, {}) }) }) }), _jsx(Handle, { type: "source", position: Position.Right, id: id, style: { right: -15, background: '#009688', borderColor: '#fff', borderWidth: 1, width: 10, height: 15, borderRadius: 3, position: 'absolute', top: 16 } })] })); } //# sourceMappingURL=input.js.map