From 758201e8628398345431464bf2c75bec20d19e7c Mon Sep 17 00:00:00 2001 From: Peter Holmberg Date: Wed, 27 Nov 2019 08:30:23 +0100 Subject: [PATCH] Forms: TextArea component (#20484) * Adding component, story and documentation file * forgot files * Add label and formvalidation * fix for error/invalid message * fixing font color when input is disabled * red border if invalid * fixing props and label margin * added support for icon in input * support for button and loading state * redoing some of the markup * fixing height on addons * Adding some basic documentation * remove not used types file * Add some more knobs * move component to it's own directory, updated styling * create component and extract some shared styles * update story name * Adding focusstyle and knobs * Sorting knobs, fix paddings * accidentaly put in a line break * use variable names in commonStyles * add simple mdx docs * Adding size to TextArea * more shared styles * remove unused import --- .../src/components/Forms/Form.story.tsx | 8 +-- .../src/components/Forms/Input/Input.tsx | 31 ++---------- .../components/Forms/TextArea/TextArea.mdx | 7 +++ .../Forms/TextArea/TextArea.story.tsx | 49 +++++++++++++++++++ .../components/Forms/TextArea/TextArea.tsx | 38 ++++++++++++++ .../src/components/Forms/commonStyles.ts | 43 ++++++++++++++++ .../grafana-ui/src/components/Forms/types.ts | 1 + 7 files changed, 144 insertions(+), 33 deletions(-) create mode 100644 packages/grafana-ui/src/components/Forms/TextArea/TextArea.mdx create mode 100644 packages/grafana-ui/src/components/Forms/TextArea/TextArea.story.tsx create mode 100644 packages/grafana-ui/src/components/Forms/TextArea/TextArea.tsx create mode 100644 packages/grafana-ui/src/components/Forms/types.ts diff --git a/packages/grafana-ui/src/components/Forms/Form.story.tsx b/packages/grafana-ui/src/components/Forms/Form.story.tsx index 38f2ef6b6b9..8db650c24cc 100644 --- a/packages/grafana-ui/src/components/Forms/Form.story.tsx +++ b/packages/grafana-ui/src/components/Forms/Form.story.tsx @@ -9,6 +9,7 @@ import { Button } from './Button'; import { Form } from './Form'; import { Switch } from './Switch'; import { Icon } from '../Icon/Icon'; +import { TextArea } from './TextArea/TextArea'; export default { title: 'UI/Forms/Test forms/Server admin', @@ -82,12 +83,7 @@ export const users = () => { label="Path to client cert" description="Authentication against LDAP servers requiring client certificates if not required leave empty " > - setPassword(e.currentTarget.value)} - size="lg" - /> +