From faa194a9c67d288e9d99122b2ec8e67ff57a2d95 Mon Sep 17 00:00:00 2001 From: Gervwyk Date: Mon, 16 Nov 2020 15:37:43 +0200 Subject: [PATCH] feat(blocksAntd): update TextInput to work with validation --- .../blocksAntd/demo/examples/TextInput.yaml | 4 + .../src/blocks/TextInput/TextInput.js | 4 +- .../src/blocks/TextInput/TextInput.json | 4 + .../__snapshots__/TextInput.test.js.snap | 1891 ++++++++++++++++- 4 files changed, 1860 insertions(+), 43 deletions(-) diff --git a/packages/blocksAntd/demo/examples/TextInput.yaml b/packages/blocksAntd/demo/examples/TextInput.yaml index 5763ca4e3..0baddfeeb 100644 --- a/packages/blocksAntd/demo/examples/TextInput.yaml +++ b/packages/blocksAntd/demo/examples/TextInput.yaml @@ -38,6 +38,10 @@ type: TextInput properties: size: large +- id: 'properties.size: small' + type: TextInput + properties: + size: small - id: 'properties.suffix: Suffix to the text' type: TextInput properties: diff --git a/packages/blocksAntd/src/blocks/TextInput/TextInput.js b/packages/blocksAntd/src/blocks/TextInput/TextInput.js index 8535058b1..630a61a1f 100644 --- a/packages/blocksAntd/src/blocks/TextInput/TextInput.js +++ b/packages/blocksAntd/src/blocks/TextInput/TextInput.js @@ -21,7 +21,7 @@ import { blockDefaultProps } from '@lowdefy/block-tools'; import Label from '../Label/Label'; import Icon from '../Icon/Icon'; -const TextInput = ({ blockId, loading, methods, properties, required, validate, value }) => { +const TextInput = ({ blockId, loading, methods, properties, required, validation, value }) => { return (