From bbb263ebfae6eda394dd8975295a98cba62306cb Mon Sep 17 00:00:00 2001 From: jxom Date: Thu, 22 Nov 2018 12:41:13 +1100 Subject: [PATCH] Added TextareaField --- src/Textarea/Textarea.mdx | 31 +- src/Textarea/TextareaField.js | 126 + src/Textarea/__tests__/TextareaField.test.js | 69 + .../__snapshots__/TextareaField.test.js.snap | 2604 +++++++++++++++++ src/Textarea/index.js | 1 + src/index.js | 2 +- 6 files changed, 2831 insertions(+), 2 deletions(-) create mode 100644 src/Textarea/TextareaField.js create mode 100644 src/Textarea/__tests__/TextareaField.test.js create mode 100644 src/Textarea/__tests__/__snapshots__/TextareaField.test.js.snap diff --git a/src/Textarea/Textarea.mdx b/src/Textarea/Textarea.mdx index 3b9e4cae5..05d0e1533 100644 --- a/src/Textarea/Textarea.mdx +++ b/src/Textarea/Textarea.mdx @@ -7,6 +7,7 @@ menu: Form import { Playground, PropsTable } from 'docz'; import { Box } from '../primitives/index'; import Textarea from './index'; +import TextareaField from './TextareaField'; import Component from '@reactions/component'; # Textarea @@ -93,12 +94,40 @@ Using an accessibility label (`a11yLabel`), will enable screen readers to read t +# TextareaField + +## Import + +`import { TextareaField } from 'fannypack'` + +## Basic Usage + +The `` component contains of the [` + +
+
+ +`; + +exports[`renders correctly for an input field with a description 1`] = ` +.c1 { + margin: unset; + padding: unset; + border: unset; + background: unset; + font: unset; + font-family: inherit; + font-size: 100%; + box-sizing: border-box; + background-color: unset; + color: inherit; +} + +.c10 { + margin: unset; + padding: unset; + border: unset; + background: unset; + font: unset; + font-family: inherit; + font-size: 100%; + box-sizing: border-box; + background-color: unset; + color: inherit; +} + +.c10.c10.c10 { + position: relative; +} + +.c12 { + margin: unset; + padding: unset; + border: unset; + background: unset; + font: unset; + font-family: inherit; + font-size: 100%; + box-sizing: border-box; + background-color: white; + color: inherit; + margin-top: 0.5rem !important; +} + +.c6 { + margin: unset; + padding: unset; + border: unset; + background: unset; + font: unset; + font-family: inherit; + font-size: 100%; + box-sizing: border-box; + background-color: unset; + color: inherit; + margin-bottom: 0.25rem !important; +} + +.c0 { + box-sizing: border-box; + font-family: system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Fira Sans', 'Droid Sans','Helvetica Neue',sans-serif; + font-size: 16px; + font-weight: 400; + line-height: 1.5; + margin: 0; + padding: 0; + overflow-x: hidden; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + color: #435a6f; +} + +.c0 *, +.c0 *::before, +.c0 *::after { + box-sizing: inherit; +} + +.c0 *:focus { + outline: 2px solid #7467c0; + outline-offset: 2px; +} + +.c9 { + display: inline-block; +} + +.c2 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; +} + +.c11 { + border: 1px solid #bdbdbd; + box-shadow: inset 0px 1px 2px #e5e5e5; + border-radius: 0.2em; + width: 100%; + padding: 0.4em 0.6em; +} + +.c11[disabled] { + background-color: #f2f2f2; + box-shadow: unset; + color: #8d8d8d; +} + +.c11:focus { + outline: unset; + z-index: 2; + border-color: #7467c0; + box-shadow: #7467c0 0px 0px 0px 1px !important; +} + +.c11::-webkit-input-placeholder { + opacity: 0.6; +} + +.c11::-moz-placeholder { + opacity: 0.6; +} + +.c11:-ms-input-placeholder { + opacity: 0.6; +} + +.c11::placeholder { + opacity: 0.6; +} + +.c5 { + display: inline-block; +} + +.c4 { + display: block; +} + +abbr.c8 { + border-bottom: 1px dotted; + cursor: help; + -webkit-text-decoration: none; + text-decoration: none; +} + +i.c8 { + font-style: italic; +} + +kbd.c8 { + background: #454d5d; + border-radius: 0.1rem; + color: #fff; + padding: 0.1rem 0.2rem; +} + +mark.c8 { + background: #ffe9b3; + border-radius: 0.1rem; + padding: 0.1rem 0.2rem; +} + +strong.c8 { + font-weight: bold; +} + +sub.c8, +sup.c8 { + font-size: 0.8em; + vertical-align: baseline; +} + +ins.c8, +u.c8 { + -webkit-text-decoration-skip: ink edges; + text-decoration-skip: ink edges; +} + +i.c8, +cite.c8, +var.c8, +em.c8 { + font-style: italic; +} + +kbd.c8, +pre.c8, +samp.c8 { + font-family: 'SF Mono','Segoe UI Mono','Roboto Mono',Menlo,Courier,monospace; +} + +.c3 { + margin-bottom: 0 !important; +} + +.c7 { + display: block; + font-size: 0.8rem; +} + +
+
+
+ +
+ + Required for your fannypack + +
+