UNPKG

@handie/squirtle

Version:

Widgets for Handie-React

17 lines (16 loc) 849 B
import { jsx as _jsx } from "react/jsx-runtime"; import { getControl } from 'handie-react'; import { FormSearchStructuralWidget } from 'handie-react/dist/widgets/class'; export default class FormSearchWidget extends FormSearchStructuralWidget { render() { const formChildren = this.renderFilters(); const standalone = this.isStandalone(); const buttonGroup = this.renderButtonGroup(); if (!standalone) { formChildren.push(buttonGroup); } const Form = getControl('Form'); const form = Form ? (_jsx(Form, Object.assign({}, this.resolveProps(), { children: formChildren }), 'FormOfFormSearchWidget')) : null; return (_jsx("div", Object.assign({ className: this.getStyleClassName('FormSearch') }, { children: standalone ? [form, buttonGroup] : [form] }), void 0)); } }