aboutsummaryrefslogtreecommitdiffstats
path: root/stories/react/Typography.stories.js
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2018-05-21 20:19:48 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-21 20:19:48 +0000
commit05b37297177e8a342668c15e5d6f738b51f7aedd (patch)
treee236c96df52a13f935292db8aa73e84d0c41ad8a /stories/react/Typography.stories.js
parent884dfb789593d2a3cc319047ab1f0215778aec9f (diff)
parent1994c98063c27a41797dec01f2ca9fcbe33ceab0 (diff)
Merge "init commit onap ui"2.0.0-ONAPbeijing2.0.0-ONAP
Diffstat (limited to 'stories/react/Typography.stories.js')
-rw-r--r--stories/react/Typography.stories.js62
1 files changed, 62 insertions, 0 deletions
diff --git a/stories/react/Typography.stories.js b/stories/react/Typography.stories.js
new file mode 100644
index 0000000..f1475c6
--- /dev/null
+++ b/stories/react/Typography.stories.js
@@ -0,0 +1,62 @@
+import React, {Component} from 'react';
+
+const typos = [
+ {className: 'heading-1', size: 28, text: 'Major Section Heading'},
+ {className: 'heading-2', size: 24, text: 'Sub-Section Heading'},
+ {className: 'heading-3', size: 20, text: 'Small Heading'},
+ {className: 'heading-4', size: 16, text: 'Small Heading'},
+ {className: 'heading-4-emphasis', size: 16, text: 'Small Heading'},
+ {className: 'heading-5', size: 14, text: 'Small Heading'},
+ {className: 'body-1', size: 14, text: 'Body (Standard) Text'},
+ {className: 'body-1-italic', size: 14, text: 'Body (Standard) Text'},
+ {className: 'body-2', size: 13, text: 'Text in Tables'},
+ {className: 'body-2-emphasis', size: 13, text: 'Text in Tables'},
+ {className: 'body-3', size: 12, text: 'Input Labels, Table Titles'},
+ {className: 'body-3-emphasis', size: 12, text: 'Even Smaller Text'},
+ {className: 'body-4', size: 10, text: 'Even Much Smaller Text'}
+];
+
+const fontWeights = ['OpenSans Regular 400', 'OpenSans Semibold 600'];
+
+function TextRow({className, size, text}) {
+ return (
+ <div className={`typo-section ${className}`}>
+ <div>{className}</div>
+ <div>{size}px</div>
+ <div className='sample-text'>{text}</div>
+ </div>
+ );
+}
+
+class Typography extends Component {
+
+ render() {
+ return (
+ <div className='typography-screen'>
+ <h1>Typography</h1>
+ <div className='typography-section'>
+ <h3>Font Family</h3>
+ <ul>
+ <li>OpenSans</li>
+ <li style={{'fontFamily': 'Arial'}}>Arial</li>
+ <li style={{'fontFamily':'sans-serif'}}>sans-serif</li>
+ </ul>
+ </div>
+ <div className='typography-section'>
+ <h3>Font Weights</h3>
+ <ul>{fontWeights.map(font => <li key={font} className={font}>{font}</li>)}</ul>
+ </div>
+ <div className='typography-section'>
+ <h3>Font Size</h3>
+ <div className='typo-table'>
+ <TextRow className='SCSS mixin name (@include ....)' size='Size (in Pixels)' text='Sample Text'/>
+ {typos.map(typo => <TextRow key={typo.className} {...typo}/>)}
+ </div>
+ </div>
+ </div>
+ );
+ }
+
+}
+
+export default Typography;