aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-05-11 10:23:44 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-05-12 03:49:17 +0800
commit0301b33a48fea3c345e2e49fa53693856770a254 (patch)
tree8df5a7134f0cd0cc1beeed287b182b00354c188a /ui/app/components
parent2381c0e0f461304265279155176fa655e2eb97b4 (diff)
downloadtangerine-wallet-browser-0301b33a48fea3c345e2e49fa53693856770a254.tar.gz
tangerine-wallet-browser-0301b33a48fea3c345e2e49fa53693856770a254.tar.zst
tangerine-wallet-browser-0301b33a48fea3c345e2e49fa53693856770a254.zip
Add TextField component to storybook
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/pages/unlock-page/unlock-page.component.js1
-rw-r--r--ui/app/components/pages/unlock-page/unlock-page.scss2
-rw-r--r--ui/app/components/text-field/text-field.stories.js24
3 files changed, 25 insertions, 2 deletions
diff --git a/ui/app/components/pages/unlock-page/unlock-page.component.js b/ui/app/components/pages/unlock-page/unlock-page.component.js
index e655b2cc3..d5e2a3224 100644
--- a/ui/app/components/pages/unlock-page/unlock-page.component.js
+++ b/ui/app/components/pages/unlock-page/unlock-page.component.js
@@ -128,7 +128,6 @@ class UnlockPage extends Component {
onChange={event => this.handleInputChange(event)}
error={error}
autoFocus
- margin="normal"
autoComplete="current-password"
fullWidth
/>
diff --git a/ui/app/components/pages/unlock-page/unlock-page.scss b/ui/app/components/pages/unlock-page/unlock-page.scss
index 47b6537e7..3d44bd037 100644
--- a/ui/app/components/pages/unlock-page/unlock-page.scss
+++ b/ui/app/components/pages/unlock-page/unlock-page.scss
@@ -29,7 +29,7 @@
&__form {
width: 100%;
- margin-top: 40px;
+ margin: 56px 0 8px;
}
&__links {
diff --git a/ui/app/components/text-field/text-field.stories.js b/ui/app/components/text-field/text-field.stories.js
new file mode 100644
index 000000000..ee3e5faaf
--- /dev/null
+++ b/ui/app/components/text-field/text-field.stories.js
@@ -0,0 +1,24 @@
+import React from 'react'
+import { storiesOf } from '@storybook/react'
+import TextField from './'
+
+storiesOf('TextField', module)
+ .add('text', () =>
+ <TextField
+ label="Text"
+ type="text"
+ />
+ )
+ .add('password', () =>
+ <TextField
+ label="Password"
+ type="password"
+ />
+ )
+ .add('error', () =>
+ <TextField
+ type="text"
+ label="Name"
+ error="Invalid value"
+ />
+ )